Update some inline docs for the `WP_Http` class. Fixes #28943.
Built from https://develop.svn.wordpress.org/trunk@29223 git-svn-id: http://core.svn.wordpress.org/trunk@29007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d2e690ac2d
commit
4b31a9143a
|
@ -60,9 +60,9 @@ class WP_Http {
|
||||||
* @access public
|
* @access public
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param string $url URI resource.
|
* @param string $url The request URL.
|
||||||
* @param str|array $args Optional. Override the defaults.
|
* @param string|array $args Optional. Override the defaults.
|
||||||
* @return array|object Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
||||||
*/
|
*/
|
||||||
public function request( $url, $args = array() ) {
|
public function request( $url, $args = array() ) {
|
||||||
global $wp_version;
|
global $wp_version;
|
||||||
|
@ -139,7 +139,7 @@ class WP_Http {
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param array $r An array of HTTP request arguments.
|
* @param array $r An array of HTTP request arguments.
|
||||||
* @param string $url The request URI resource.
|
* @param string $url The request URL.
|
||||||
*/
|
*/
|
||||||
$r = apply_filters( 'http_request_args', $r, $url );
|
$r = apply_filters( 'http_request_args', $r, $url );
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ class WP_Http {
|
||||||
*
|
*
|
||||||
* @param bool $preempt Whether to preempt an HTTP request return. Default false.
|
* @param bool $preempt Whether to preempt an HTTP request return. Default false.
|
||||||
* @param array $r HTTP request arguments.
|
* @param array $r HTTP request arguments.
|
||||||
* @param string $url The request URI resource.
|
* @param string $url The request URL.
|
||||||
*/
|
*/
|
||||||
$pre = apply_filters( 'pre_http_request', false, $r, $url );
|
$pre = apply_filters( 'pre_http_request', false, $r, $url );
|
||||||
if ( false !== $pre )
|
if ( false !== $pre )
|
||||||
|
@ -321,7 +321,7 @@ class WP_Http {
|
||||||
*
|
*
|
||||||
* @param string $url URL to Request
|
* @param string $url URL to Request
|
||||||
* @param array $args Request arguments
|
* @param array $args Request arguments
|
||||||
* @return array|object Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
||||||
*/
|
*/
|
||||||
private function _dispatch_request( $url, $args ) {
|
private function _dispatch_request( $url, $args ) {
|
||||||
static $transports = array();
|
static $transports = array();
|
||||||
|
@ -341,11 +341,11 @@ class WP_Http {
|
||||||
*
|
*
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*
|
*
|
||||||
* @param mixed $response HTTP Response or WP_Error object.
|
* @param array|WP_Error $response HTTP response or WP_Error object.
|
||||||
* @param string $context Context under which the hook is fired.
|
* @param string $context Context under which the hook is fired.
|
||||||
* @param string $class HTTP transport used.
|
* @param string $class HTTP transport used.
|
||||||
* @param array $args HTTP request arguments.
|
* @param array $args HTTP request arguments.
|
||||||
* @param string $url The request URL.
|
* @param string $url The request URL.
|
||||||
*/
|
*/
|
||||||
do_action( 'http_api_debug', $response, 'response', $class, $args, $url );
|
do_action( 'http_api_debug', $response, 'response', $class, $args, $url );
|
||||||
|
|
||||||
|
@ -357,9 +357,9 @@ class WP_Http {
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
* @param array|obj $response HTTP Response.
|
* @param array $response HTTP response.
|
||||||
* @param array $args HTTP request arguments.
|
* @param array $args HTTP request arguments.
|
||||||
* @param string $url The request URL.
|
* @param string $url The request URL.
|
||||||
*/
|
*/
|
||||||
return apply_filters( 'http_response', $response, $args, $url );
|
return apply_filters( 'http_response', $response, $args, $url );
|
||||||
}
|
}
|
||||||
|
@ -372,9 +372,9 @@ class WP_Http {
|
||||||
* @access public
|
* @access public
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param string $url URI resource.
|
* @param string $url The request URL.
|
||||||
* @param string|array $args Optional. Override the defaults.
|
* @param string|array $args Optional. Override the defaults.
|
||||||
* @return array|object Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
||||||
*/
|
*/
|
||||||
public function post($url, $args = array()) {
|
public function post($url, $args = array()) {
|
||||||
$defaults = array('method' => 'POST');
|
$defaults = array('method' => 'POST');
|
||||||
|
@ -390,9 +390,9 @@ class WP_Http {
|
||||||
* @access public
|
* @access public
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param string $url URI resource.
|
* @param string $url The request URL.
|
||||||
* @param str|array $args Optional. Override the defaults.
|
* @param string|array $args Optional. Override the defaults.
|
||||||
* @return array|object Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
||||||
*/
|
*/
|
||||||
public function get($url, $args = array()) {
|
public function get($url, $args = array()) {
|
||||||
$defaults = array('method' => 'GET');
|
$defaults = array('method' => 'GET');
|
||||||
|
@ -408,9 +408,9 @@ class WP_Http {
|
||||||
* @access public
|
* @access public
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param string $url URI resource.
|
* @param string $url The request URL.
|
||||||
* @param str|array $args Optional. Override the defaults.
|
* @param string|array $args Optional. Override the defaults.
|
||||||
* @return array|object Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
||||||
*/
|
*/
|
||||||
public function head($url, $args = array()) {
|
public function head($url, $args = array()) {
|
||||||
$defaults = array('method' => 'HEAD');
|
$defaults = array('method' => 'HEAD');
|
||||||
|
@ -783,9 +783,9 @@ class WP_Http_Streams {
|
||||||
* @since 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client().
|
* @since 3.7.0 Combined with the fsockopen transport and switched to stream_socket_client().
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param string $url URI resource.
|
* @param string $url The request URL.
|
||||||
* @param string|array $args Optional. Override the defaults.
|
* @param string|array $args Optional. Override the defaults.
|
||||||
* @return array 'headers', 'body', 'response', 'cookies' and 'filename' keys.
|
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
||||||
*/
|
*/
|
||||||
public function request($url, $args = array()) {
|
public function request($url, $args = array()) {
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
|
@ -1218,9 +1218,9 @@ class WP_Http_Curl {
|
||||||
* @access public
|
* @access public
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*
|
*
|
||||||
* @param string $url
|
* @param string $url The request URL.
|
||||||
* @param str|array $args Optional. Override the defaults.
|
* @param string|array $args Optional. Override the defaults.
|
||||||
* @return array 'headers', 'body', 'response', 'cookies' and 'filename' keys.
|
* @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error
|
||||||
*/
|
*/
|
||||||
public function request($url, $args = array()) {
|
public function request($url, $args = array()) {
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
|
@ -1355,7 +1355,7 @@ class WP_Http_Curl {
|
||||||
*
|
*
|
||||||
* @param resource &$handle The cURL handle returned by curl_init().
|
* @param resource &$handle The cURL handle returned by curl_init().
|
||||||
* @param array $r The HTTP request arguments.
|
* @param array $r The HTTP request arguments.
|
||||||
* @param string $url The destination URL.
|
* @param string $url The request URL.
|
||||||
*/
|
*/
|
||||||
do_action_ref_array( 'http_api_curl', array( &$handle, $r, $url ) );
|
do_action_ref_array( 'http_api_curl', array( &$handle, $r, $url ) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue