http_api_debug

http_api_debug

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

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('http_api_debug') is found 5 times:

  • /wp-includes/class-wp-http.php line 292
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    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
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    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
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
        $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
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    * @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
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    $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 */