wphooks.info - http_api_debug

http_api_debug

The hook occurs in the following 2 files

wp-includes/class-http.php:
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
		 * Fires after an HTTP API response is received and before the response is returned.
		 *
		 * @since 2.8.0
		 *
		 * @param array|WP_Error $response HTTP response or WP_Error object.
		 * @param string         $context  Context under which the hook is fired.
		 * @param string         $class    HTTP transport used.
		 * @param array          $args     HTTP request arguments.
		 * @param string         $url      The request URL.
		 */
		do_action( 'http_api_debug', $response, 'response', 'Requests', $r, $url );
		if ( is_wp_error( $response ) ) {
			return $response;
		}

		if ( ! $r['blocking'] ) {
			return array(
				'headers' => array(),
				'body' => '',
				'response' => array(
wp-includes/class-http.php:
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
		if ( !$class )
			return new WP_Error( 'http_failure', __( 'There are no HTTP transports available which can complete the requested request.' ) );

		// Transport claims to support request, instantiate it and give it a whirl.
		if ( empty( $transports[$class] ) )
			$transports[$class] = new $class;

		$response = $transports[$class]->request( $url, $args );

		/** This action is documented in wp-includes/class-http.php */
		do_action( 'http_api_debug', $response, 'response', $class, $args, $url );

		if ( is_wp_error( $response ) )
			return $response;

		/**
		 * Filters the HTTP API response immediately before the response is returned.
		 *
		 * @since 2.9.0
		 *