Add default args list to wp_remote_request|get|post|head docblocks

Props DrewAPicture
fixes #23838


git-svn-id: https://develop.svn.wordpress.org/trunk@24250 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2013-05-14 14:00:19 +00:00
parent de589f8ebe
commit 8ec3a3a34b
1 changed files with 22 additions and 3 deletions

View File

@ -49,6 +49,25 @@ function _wp_http_get_object() {
* This function is called first to make the request and there are other API * This function is called first to make the request and there are other API
* functions to abstract out the above convoluted setup. * functions to abstract out the above convoluted setup.
* *
* List of default arguments:
* 'method' => 'GET'
* - Default 'GET' for wp_remote_get()
* - Default 'POST' for wp_remote_post()
* - Default 'HEAD' for wp_remote_head()
* 'timeout' => 5
* 'redirection' => 5
* 'httpversion' => '1.0'
* 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
* 'blocking' => true
* 'headers' => array()
* 'cookies' => array()
* 'body' => null
* 'compress' => false,
* 'decompress' => true,
* 'sslverify' => true,
* 'stream' => false,
* 'filename' => null
*
* @since 2.7.0 * @since 2.7.0
* *
* @param string $url Site URL to retrieve. * @param string $url Site URL to retrieve.
@ -63,7 +82,7 @@ function wp_remote_request($url, $args = array()) {
/** /**
* Retrieve the raw response from the HTTP request using the GET method. * Retrieve the raw response from the HTTP request using the GET method.
* *
* @see wp_remote_request() For more information on the response array format. * @see wp_remote_request() For more information on the response array format and default arguments.
* *
* @since 2.7.0 * @since 2.7.0
* *
@ -79,7 +98,7 @@ function wp_remote_get($url, $args = array()) {
/** /**
* Retrieve the raw response from the HTTP request using the POST method. * Retrieve the raw response from the HTTP request using the POST method.
* *
* @see wp_remote_request() For more information on the response array format. * @see wp_remote_request() For more information on the response array format and default arguments.
* *
* @since 2.7.0 * @since 2.7.0
* *
@ -95,7 +114,7 @@ function wp_remote_post($url, $args = array()) {
/** /**
* Retrieve the raw response from the HTTP request using the HEAD method. * Retrieve the raw response from the HTTP request using the HEAD method.
* *
* @see wp_remote_request() For more information on the response array format. * @see wp_remote_request() For more information on the response array format and default arguments.
* *
* @since 2.7.0 * @since 2.7.0
* *