wphooks.info - http_api_debug

http_api_debug

(trunk - 5.0-alpha-42716)

The hook occurs in the following 2 files

wp-includes/class-http.php:
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
		 * 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          $r        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:
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
		}

		// 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