Filter any HTTP request URI?

I want to filter any HTTP request URI done through the HTTP API. Use cases: The WordPress update check goes to http://api.wordpress.org/core/version-check/1.6/, but https://api.wordpress.org/core/version-check/1.6/ works too, and I want to use this always. The new WordPress file is taken from http://wordpress.org/wordpress-3.4.2.zip, but https://wordpress.org/wordpress-3.4.2.zip works too. Sometimes I want to debug requests and redirect those temporary … Read more

Sending JSON string through wp_remote_post()

I’m building a mailchimp integration and they require a POST call with JSON code. No, I’m using this code that actually works: $data = wp_remote_post($url, array( ‘headers’ => array(‘Content-Type’ => ‘application/json; charset=utf-8’), ‘body’ => json_encode($array_with_parameters), ‘method’ => ‘POST’ )); But, it returns a PHP warning Warning: http_build_query(): Parameter 1 expected to be Array or Object. … Read more