Title: http_api_transports
Published: April 25, 2014
Last modified: April 28, 2025

---

# apply_filters_deprecated( ‘http_api_transports’, string[] $transports, array $args, string $url )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/http_api_transports/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/http_api_transports/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/http_api_transports/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/http_api_transports/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/http_api_transports/?output_format=md#wp--skip-link--target)

This hook has been deprecated since 6.4.0. Use WpOrgRequestsRequests::get_transport_class()
instead.

Filters which HTTP transports are available and in what order.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/http_api_transports/?output_format=md#parameters)󠁿

 `$transports`string[]

Array of HTTP transports to check. Default array contains `'curl'` and `'streams'`,
in that order.

`$args`array

HTTP request arguments.

`$url`string

The URL to request.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/http_api_transports/?output_format=md#source)󠁿

    ```php
    $request_order = apply_filters_deprecated( 'http_api_transports', array( $transports, $args, $url ), '6.4.0' );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-http.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-http.php#L560)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-http.php#L560-L560)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/http_api_transports/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Http::_get_first_available_transport()](https://developer.wordpress.org/reference/classes/wp_http/_get_first_available_transport/)`wp-includes/class-wp-http.php` |

Tests which transports are capable of supporting the request.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/http_api_transports/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.4.0](https://developer.wordpress.org/reference/since/6.4.0/) | Deprecated. Use WpOrgRequestsRequests::get_transport_class() | 
| [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fhttp_api_transports%2F)
before being able to contribute a note or feedback.