MediaWiki REL1_34
|
Factory creating MWHttpRequest objects. More...
Public Member Functions | |
canMakeRequests () | |
Simple function to test if we can make any sort of requests at all, using cURL or fopen() | |
create ( $url, array $options=[], $caller=__METHOD__) | |
Generate a new MWHttpRequest object. | |
get ( $url, array $options=[], $caller=__METHOD__) | |
Simple wrapper for request( 'GET' ), parameters have same meaning as for request() | |
getUserAgent () | |
post ( $url, array $options=[], $caller=__METHOD__) | |
Simple wrapper for request( 'POST' ), parameters have same meaning as for request() | |
request ( $method, $url, array $options=[], $caller=__METHOD__) | |
Perform an HTTP request. | |
Factory creating MWHttpRequest objects.
Definition at line 35 of file HttpRequestFactory.php.
MediaWiki\Http\HttpRequestFactory::canMakeRequests | ( | ) |
Simple function to test if we can make any sort of requests at all, using cURL or fopen()
Definition at line 95 of file HttpRequestFactory.php.
References wfIniGetBool().
MediaWiki\Http\HttpRequestFactory::create | ( | $url, | |
array | $options = [] , |
||
$caller = __METHOD__ |
|||
) |
Generate a new MWHttpRequest object.
string | $url | Url to use |
array | $options | Possible keys for the array:
|
-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
string | $caller | The method making this request, for profiling |
RuntimeException |
Definition at line 69 of file HttpRequestFactory.php.
References Http\$httpEngine, and Profiler\instance().
Referenced by MediaWiki\Http\HttpRequestFactory\request().
MediaWiki\Http\HttpRequestFactory::get | ( | $url, | |
array | $options = [] , |
||
$caller = __METHOD__ |
|||
) |
Simple wrapper for request( 'GET' ), parameters have same meaning as for request()
string | $url | |
array | $options | |
string | $caller |
Definition at line 145 of file HttpRequestFactory.php.
References MediaWiki\Http\HttpRequestFactory\request().
MediaWiki\Http\HttpRequestFactory::getUserAgent | ( | ) |
MediaWiki\Http\HttpRequestFactory::post | ( | $url, | |
array | $options = [] , |
||
$caller = __METHOD__ |
|||
) |
Simple wrapper for request( 'POST' ), parameters have same meaning as for request()
string | $url | |
array | $options | |
string | $caller |
Definition at line 158 of file HttpRequestFactory.php.
References MediaWiki\Http\HttpRequestFactory\request().
MediaWiki\Http\HttpRequestFactory::request | ( | $method, | |
$url, | |||
array | $options = [] , |
||
$caller = __METHOD__ |
|||
) |
Perform an HTTP request.
string | $method | HTTP method. Usually GET/POST |
string | $url | Full URL to act on. If protocol-relative, will be expanded to an http:// URL |
array | $options | See HttpRequestFactory::create |
string | $caller | The method making this request, for profiling |
Definition at line 110 of file HttpRequestFactory.php.
References MediaWiki\Http\HttpRequestFactory\create().
Referenced by MediaWiki\Http\HttpRequestFactory\get(), and MediaWiki\Http\HttpRequestFactory\post().