Sending wp_remote_request with body, results do not match postman

[ad_1]

So I am trying to make a remote api request for my client, the target server has a really weird body requirement in the form of an array containing a js object.

I am able to successfully make the api call using postman and also successfully make the api call if the request do not contain a body, but I am unable to produce the same result if the request contains a body, I suspect that I wasnt able to encode my regular array containing an associative array properly in php to its JSON equivalent.

I tried sending the api call using the nested array itself and using the json_encode version without any flags as the body, both attempted failed.

Is there anything else I missed?

[ad_2]
1 Comment
  1. You’ve given us nothing to go on. Documentation? Name of the API? Code sample? C’mon, put some effort in.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer