Requests::add_transport( string $transport )

Register a transport

Parameters

$transport

(string) (Required) Transport class to add, must support the Requests_Transport interface

Source

File: wp-includes/class-requests.php

public static function add_transport($transport) {
		if (empty(self::$transports)) {
			self::$transports = array(
				'Requests_Transport_cURL',
				'Requests_Transport_fsockopen',
			);
		}

		self::$transports = array_merge(self::$transports, array($transport));
	}

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests/add_transport