Requests::add_transport()
最后更新于:2021-11-25 22:44:00
Requests::add_transport( string$transport)Register a transport
参数
- $transport
-
(string) (Required) Transport class to add, must support the Requests_Transport interface
源文件
文件: gc-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));
}