[wp-hackers] Possible bug with HTTP API using cookies

William P. Davis will.davis at gmail.com
Tue Jul 31 13:36:02 UTC 2012


I've tried that before. When I pass the full $response[ 'cookies' ] array
to wp_remote_post no cookies are passed at all. When I pass just the
initial object in the $response[ 'cookies' ] array I get Catchable fatal
error: Object of class WP_Http_Cookie could not be converted to string in
/Applications/MAMP/htdocs/304/wp-includes/class-http.php on line 419.

Will

The best bet is something like this:
$response = wp_remote_post(...);
$response2 = wp_remote_post( ..... 'cookie' => $response['cookies'] ) );


More information about the wp-hackers mailing list