MediaWiki REL1_33
MediaWiki\Http\HttpRequestFactory Class Reference

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.
 

Detailed Description

Factory creating MWHttpRequest objects.

Definition at line 34 of file HttpRequestFactory.php.

Member Function Documentation

◆ canMakeRequests()

MediaWiki\Http\HttpRequestFactory::canMakeRequests ( )

Simple function to test if we can make any sort of requests at all, using cURL or fopen()

Returns
bool

Definition at line 81 of file HttpRequestFactory.php.

References and(), and wfIniGetBool().

◆ create()

MediaWiki\Http\HttpRequestFactory::create ( $url,
array $options = [],
$caller = __METHOD__ )

Generate a new MWHttpRequest object.

Parameters
string$urlUrl to use
array$options(optional) extra params to pass (see Http::request())
string$callerThe method making this request, for profiling
Exceptions
DomainException
Returns
MWHttpRequest
See also
MWHttpRequest::__construct

Definition at line 45 of file HttpRequestFactory.php.

References Http\$httpEngine, $options, and(), Profiler\instance(), and wfIniGetBool().


The documentation for this class was generated from the following file: