HTTP API improvements. Implements chunked transfer decoding. Moves plugin update checker over to api. see #4779 props santosj.

git-svn-id: https://develop.svn.wordpress.org/trunk@8630 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2008-08-12 21:21:11 +00:00
parent 935afabf92
commit ca850a4456
3 changed files with 225 additions and 185 deletions

View File

@@ -10,7 +10,7 @@ function plugins_api($action, $args = NULL) {
$res = apply_filters('plugins_api', false, $action, $args); //NOTE: Allows a plugin to completely override the builtin WordPress.org API.
if ( ! $res ) {
$request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/', array(), array(), array('action' => $action, 'request' => serialize($args)) );
$request = wp_remote_post('http://api.wordpress.org/plugins/info/1.0/', array( 'body' => array('action' => $action, 'request' => serialize($args))) );
$res = unserialize($request['body']);
if ( ! $res )
wp_die($request['body']);