From 8ec3a3a34bdbe7e46f383081457be01cbd300bf1 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 14 May 2013 14:00:19 +0000 Subject: [PATCH] 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 --- wp-includes/http.php | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/wp-includes/http.php b/wp-includes/http.php index 56e4f9ff20..acd273dbb8 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -49,6 +49,25 @@ function _wp_http_get_object() { * This function is called first to make the request and there are other API * 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 * * @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. * - * @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 * @@ -79,7 +98,7 @@ function wp_remote_get($url, $args = array()) { /** * 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 * @@ -95,7 +114,7 @@ function wp_remote_post($url, $args = array()) { /** * 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 *