I am trying to create a WP plugin that calls an external API using HTTP POST. I am using wp_remote_post
and my arguments look like this:
$body = array(
'CustomerID' => '10',
'Items' => ['5', '7'],
);
What I want to end up with is this as my POST data:
CustomerID=10&Items=5&Items=7
But this does not seems to work as expected... Can anyone point me to the right direction?
Also, how can I log the final request parameters, in the same form the external API will get them?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745352841a4623940.html
评论列表(0条)