Changeset View
Changeset View
Standalone View
Standalone View
lib/drivers/seafile/seafile_api.php
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | class seafile_api | ||||
* | * | ||||
* @param array Configuration for this Request instance, that will be merged | * @param array Configuration for this Request instance, that will be merged | ||||
* with default configuration | * with default configuration | ||||
* | * | ||||
* @return HTTP_Request2 Request object | * @return HTTP_Request2 Request object | ||||
*/ | */ | ||||
public static function http_request($config = array()) | public static function http_request($config = array()) | ||||
{ | { | ||||
// load HTTP_Request2 | |||||
require_once 'HTTP/Request2.php'; | |||||
// remove unknown config, otherwise HTTP_Request will throw an error | // remove unknown config, otherwise HTTP_Request will throw an error | ||||
$config = array_intersect_key($config, array_flip(array( | $config = array_intersect_key($config, array_flip(array( | ||||
'connect_timeout', 'timeout', 'use_brackets', 'protocol_version', | 'connect_timeout', 'timeout', 'use_brackets', 'protocol_version', | ||||
'buffer_size', 'store_body', 'follow_redirects', 'max_redirects', | 'buffer_size', 'store_body', 'follow_redirects', 'max_redirects', | ||||
'strict_redirects', 'ssl_verify_peer', 'ssl_verify_host', | 'strict_redirects', 'ssl_verify_peer', 'ssl_verify_host', | ||||
'ssl_cafile', 'ssl_capath', 'ssl_local_cert', 'ssl_passphrase' | 'ssl_cafile', 'ssl_capath', 'ssl_local_cert', 'ssl_passphrase' | ||||
))); | ))); | ||||
▲ Show 20 Lines • Show All 1,279 Lines • Show Last 20 Lines |