http_api_debug

http_api_debug

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('http_api_debug') is found 5 times:

  • /wp-includes/class-wp-http.php line 292
     
    		if ( empty( $url ) || empty( $parsed_url['scheme'] ) ) {
    			$response = new WP_Error( 'http_request_failed', __( 'A valid URL was not provided.' ) );
    			/** This action is documented in wp-includes/class-wp-http.php */
    			do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
    			return $response;
    		}
    
    		if ( $this->block_request( $url ) ) {
    			$response = new WP_Error( 'http_request_not_executed', __( 'User has blocked requests through HTTP.' ) );
    			/** This action is documented in wp-includes/class-wp-http.php */
    
  • /wp-includes/class-wp-http.php line 299
     
    		if ( $this->block_request( $url ) ) {
    			$response = new WP_Error( 'http_request_not_executed', __( 'User has blocked requests through HTTP.' ) );
    			/** This action is documented in wp-includes/class-wp-http.php */
    			do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
    			return $response;
    		}
    
    		// If we are streaming to a file but no filename was given drop it in the WP temp dir
    		// and pick its name using the basename of the $url.
    		if ( $parsed_args['stream'] ) {
    
  • /wp-includes/class-wp-http.php line 316
    			$parsed_args['blocking'] = true;
    			if ( ! wp_is_writable( dirname( $parsed_args['filename'] ) ) ) {
    				$response = new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) );
    				/** This action is documented in wp-includes/class-wp-http.php */
    				do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
    				return $response;
    			}
    		}
    
    		if ( is_null( $parsed_args['headers'] ) ) {
    			$parsed_args['headers'] = array();
    
  • /wp-includes/class-wp-http.php line 435
    		 * @param string         $class       HTTP transport used.
    		 * @param array          $parsed_args HTTP request arguments.
    		 * @param string         $url         The request URL.
    		 */
    		do_action( 'http_api_debug', $response, 'response', 'WpOrg\Requests\Requests', $parsed_args, $url );
    		if ( is_wp_error( $response ) ) {
    			return $response;
    		}
    
    		if ( ! $parsed_args['blocking'] ) {
    			return array(
    
  • /wp-includes/class-wp-http.php line 608
     
    		$response = $transports[ $class ]->request( $url, $args );
    
    		/** This action is documented in wp-includes/class-wp-http.php */
    		do_action( 'http_api_debug', $response, 'response', $class, $args, $url );
    
    		if ( is_wp_error( $response ) ) {
    			return $response;
    		}
    
    		/** This filter is documented in wp-includes/class-wp-http.php */