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 *