X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhttp%2FHttpRequestFactory.php;h=84e7b739bd37e11ab7335bc2f1fcb09490c48c61;hb=732cf4d5bf47402c859cb96a23a717908a76eb56;hp=8433df6e0890cedc2f1385c44aaf3151326e2846;hpb=67ede2daaca02a9a34e549ae978e39d01743598a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/http/HttpRequestFactory.php b/includes/http/HttpRequestFactory.php index 8433df6e08..84e7b739bd 100644 --- a/includes/http/HttpRequestFactory.php +++ b/includes/http/HttpRequestFactory.php @@ -37,8 +37,8 @@ class HttpRequestFactory { * Generate a new MWHttpRequest object * @param string $url Url to use * @param array $options Possible keys for the array: - * - timeout Timeout length in seconds - * - connectTimeout Timeout for connection, in seconds (curl only) + * - timeout Timeout length in seconds or 'default' + * - connectTimeout Timeout for connection, in seconds (curl only) or 'default' * - postData An array of key-value pairs or a url-encoded form data * - proxy The proxy to use. * Otherwise it will use $wgHTTPProxy (if set) @@ -59,13 +59,12 @@ class HttpRequestFactory { * - originalRequest Information about the original request (as a WebRequest object or * an associative array with 'ip' and 'userAgent'). * @codingStandardsIgnoreStart - * @phan-param array{timeout?:int,connectTimeout?:int,postData?:array,proxy?:string,noProxy?:bool,sslVerifyHost?:bool,sslVerifyCert?:bool,caInfo?:string,maxRedirects?:int,followRedirects?:bool,userAgent?:string,logger?:\Psr\Logger\LoggerInterface,username?:string,password?:string,originalRequest?:WebRequest|array{ip:string,userAgent:string}} $options + * @phan-param array{timeout?:int|string,connectTimeout?:int|string,postData?:array,proxy?:string,noProxy?:bool,sslVerifyHost?:bool,sslVerifyCert?:bool,caInfo?:string,maxRedirects?:int,followRedirects?:bool,userAgent?:string,method?:string,logger?:\Psr\Log\LoggerInterface,username?:string,password?:string,originalRequest?:\WebRequest|array{ip:string,userAgent:string}} $options * @codingStandardsIgnoreEnd * @param string $caller The method making this request, for profiling * @throws RuntimeException * @return MWHttpRequest * @see MWHttpRequest::__construct - * @suppress PhanUndeclaredTypeParameter */ public function create( $url, array $options = [], $caller = __METHOD__ ) { if ( !Http::$httpEngine ) {