Sending JSON string through wp_remote_post()

Try setting the data_format parameter in your request like so: $data = wp_remote_post($url, array( ‘headers’ => array(‘Content-Type’ => ‘application/json; charset=utf-8’), ‘body’ => json_encode($array_with_parameters), ‘method’ => ‘POST’, ‘data_format’ => ‘body’, )); It looks like the format may be defaulting to query, in which case WordPress attempts to format the data using http_build_query, which is giving you … Read more