MediaWiki  REL1_31
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() More...
 
 create ( $url, array $options=[], $caller=__METHOD__)
 Generate a new MWHttpRequest object. More...
 

Detailed Description

Factory creating MWHttpRequest objects.

Definition at line 33 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 78 of file HttpRequestFactory.php.

References 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 44 of file HttpRequestFactory.php.

References Http\$httpEngine, $options, MediaWiki\Logger\LoggerFactory\getInstance(), Profiler\instance(), and wfIniGetBool().


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