Changeset 29223
- Timestamp:
- 07/18/2014 06:14:09 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-http.php
r29107 r29223 61 61 * @since 2.7.0 62 62 * 63 * @param string $url URI resource.64 * @param str |array $args Optional. Override the defaults.65 * @return array| objectArray containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error63 * @param string $url The request URL. 64 * @param string|array $args Optional. Override the defaults. 65 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error 66 66 */ 67 67 public function request( $url, $args = array() ) { … … 140 140 * 141 141 * @param array $r An array of HTTP request arguments. 142 * @param string $url The request UR I resource.142 * @param string $url The request URL. 143 143 */ 144 144 $r = apply_filters( 'http_request_args', $r, $url ); … … 158 158 * @param bool $preempt Whether to preempt an HTTP request return. Default false. 159 159 * @param array $r HTTP request arguments. 160 * @param string $url The request UR I resource.160 * @param string $url The request URL. 161 161 */ 162 162 $pre = apply_filters( 'pre_http_request', false, $r, $url ); … … 322 322 * @param string $url URL to Request 323 323 * @param array $args Request arguments 324 * @return array| objectArray containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error324 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error 325 325 */ 326 326 private function _dispatch_request( $url, $args ) { … … 342 342 * @since 2.8.0 343 343 * 344 * @param mixed $response HTTP Response or WP_Error object. 345 * @param string $context Context under which the hook is fired. 346 * @param string $class HTTP transport used. 344 * @param array|WP_Error $response HTTP response or WP_Error object. 345 * @param string $context Context under which the hook is fired. 346 * @param string $class HTTP transport used. 347 * @param array $args HTTP request arguments. 348 * @param string $url The request URL. 349 */ 350 do_action( 'http_api_debug', $response, 'response', $class, $args, $url ); 351 352 if ( is_wp_error( $response ) ) 353 return $response; 354 355 /** 356 * Filter the HTTP API response immediately before the response is returned. 357 * 358 * @since 2.9.0 359 * 360 * @param array $response HTTP response. 347 361 * @param array $args HTTP request arguments. 348 362 * @param string $url The request URL. 349 363 */ 350 do_action( 'http_api_debug', $response, 'response', $class, $args, $url );351 352 if ( is_wp_error( $response ) )353 return $response;354 355 /**356 * Filter the HTTP API response immediately before the response is returned.357 *358 * @since 2.9.0359 *360 * @param array|obj $response HTTP Response.361 * @param array $args HTTP request arguments.362 * @param string $url The request URL.363 */364 364 return apply_filters( 'http_response', $response, $args, $url ); 365 365 } … … 373 373 * @since 2.7.0 374 374 * 375 * @param string $url URI resource.375 * @param string $url The request URL. 376 376 * @param string|array $args Optional. Override the defaults. 377 * @return array| objectArray containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error377 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error 378 378 */ 379 379 public function post($url, $args = array()) { … … 391 391 * @since 2.7.0 392 392 * 393 * @param string $url URI resource.394 * @param str |array $args Optional. Override the defaults.395 * @return array| objectArray containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error393 * @param string $url The request URL. 394 * @param string|array $args Optional. Override the defaults. 395 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error 396 396 */ 397 397 public function get($url, $args = array()) { … … 409 409 * @since 2.7.0 410 410 * 411 * @param string $url URI resource.412 * @param str |array $args Optional. Override the defaults.413 * @return array| objectArray containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error411 * @param string $url The request URL. 412 * @param string|array $args Optional. Override the defaults. 413 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error 414 414 */ 415 415 public function head($url, $args = array()) { … … 784 784 * 785 785 * @access public 786 * @param string $url URI resource.786 * @param string $url The request URL. 787 787 * @param string|array $args Optional. Override the defaults. 788 * @return array 'headers', 'body', 'response', 'cookies' and 'filename' keys.788 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error 789 789 */ 790 790 public function request($url, $args = array()) { … … 1219 1219 * @since 2.7.0 1220 1220 * 1221 * @param string $url 1222 * @param str |array $args Optional. Override the defaults.1223 * @return array 'headers', 'body', 'response', 'cookies' and 'filename' keys.1221 * @param string $url The request URL. 1222 * @param string|array $args Optional. Override the defaults. 1223 * @return array|WP_Error Array containing 'headers', 'body', 'response', 'cookies', 'filename'. A WP_Error instance upon error 1224 1224 */ 1225 1225 public function request($url, $args = array()) { … … 1356 1356 * @param resource &$handle The cURL handle returned by curl_init(). 1357 1357 * @param array $r The HTTP request arguments. 1358 * @param string $url The destinationURL.1358 * @param string $url The request URL. 1359 1359 */ 1360 1360 do_action_ref_array( 'http_api_curl', array( &$handle, $r, $url ) );
Note: See TracChangeset
for help on using the changeset viewer.