MediaWiki  1.23.12
CurlHttpRequest Class Reference

MWHttpRequest implemented using internal curl compiled into PHP. More...

Inheritance diagram for CurlHttpRequest:
Collaboration diagram for CurlHttpRequest:

Public Member Functions

 canFollowRedirects ()
 
 execute ()
 Take care of whatever is necessary to perform the URI request. More...
 
- Public Member Functions inherited from MWHttpRequest
 getContent ()
 Get the body, or content, of the response to the request. More...
 
 getCookieJar ()
 Returns the cookie jar in use. More...
 
 getFinalUrl ()
 Returns the final URL after all redirections. More...
 
 getHeaderList ()
 Get an array of the headers. More...
 
 getResponseHeader ( $header)
 Returns the value of the given response header. More...
 
 getResponseHeaders ()
 Returns an associative array of response headers after the request has been executed. More...
 
 getStatus ()
 Get the integer value of the HTTP status code (e.g. More...
 
 isRedirect ()
 Returns true if the last status code was a redirect. More...
 
 proxySetup ()
 Take care of setting up the proxy (do nothing if "noProxy" is set) More...
 
 read ( $fh, $content)
 A generic callback to read the body of the response from a remote server. More...
 
 setCallback ( $callback)
 Set a read callback to accept data read from the HTTP request. More...
 
 setCookie ( $name, $value=null, $attr=null)
 Sets a cookie. More...
 
 setCookieJar ( $jar)
 Tells the MWHttpRequest object to use this pre-loaded CookieJar. More...
 
 setData ( $args)
 Set the parameters of the request. More...
 
 setHeader ( $name, $value)
 Set an arbitrary header. More...
 
 setUserAgent ( $UA)
 Set the user agent. More...
 

Public Attributes

const SUPPORTS_FILE_POSTS = true
 
- Public Attributes inherited from MWHttpRequest
 $status
 
const SUPPORTS_FILE_POSTS = false
 

Protected Member Functions

 readHeader ( $fh, $content)
 
- Protected Member Functions inherited from MWHttpRequest
 __construct ( $url, $options=array())
 
 parseCookies ()
 Parse the cookies in the response headers and store them in the cookie jar. More...
 
 parseHeader ()
 Parses the headers, including the HTTP status code and any Set-Cookie headers. More...
 
 setStatus ()
 Sets HTTPRequest status member to a fatal value with the error message if the returned integer value of the status code was not successful (< 300) or a redirect (>=300 and < 400). More...
 

Protected Attributes

 $curlOptions = array()
 
 $headerText = ""
 
- Protected Attributes inherited from MWHttpRequest
 $caInfo = null
 
 $callback
 
 $content
 
CookieJar $cookieJar
 
 $followRedirects = false
 
 $headerList = array()
 
 $headersOnly = null
 
 $maxRedirects = 5
 
 $method = "GET"
 
 $noProxy = false
 
 $parsedUrl
 
 $postData = null
 
 $proxy = null
 
 $reqHeaders = array()
 
 $respHeaders = array()
 
 $respStatus = "200 Ok"
 
 $respVersion = "0.9"
 
 $sslVerifyCert = true
 
 $sslVerifyHost = true
 
 $timeout = 'default'
 
 $url
 

Additional Inherited Members

- Static Public Member Functions inherited from MWHttpRequest
static canMakeRequests ()
 Simple function to test if we can make any sort of requests at all, using cURL or fopen() More...
 
static factory ( $url, $options=null)
 Generate a new request object. More...
 

Detailed Description

MWHttpRequest implemented using internal curl compiled into PHP.

Definition at line 706 of file HttpFunctions.php.

Member Function Documentation

◆ canFollowRedirects()

CurlHttpRequest::canFollowRedirects ( )
Returns
bool

Reimplemented from MWHttpRequest.

Definition at line 826 of file HttpFunctions.php.

References wfDebug(), and wfIniGetBool().

Referenced by execute().

◆ execute()

◆ readHeader()

CurlHttpRequest::readHeader (   $fh,
  $content 
)
protected
Parameters
$fh
$content
Returns
int

Definition at line 717 of file HttpFunctions.php.

References MWHttpRequest\$content.

Member Data Documentation

◆ $curlOptions

CurlHttpRequest::$curlOptions = array()
protected

Definition at line 709 of file HttpFunctions.php.

◆ $headerText

CurlHttpRequest::$headerText = ""
protected

Definition at line 710 of file HttpFunctions.php.

◆ SUPPORTS_FILE_POSTS

const CurlHttpRequest::SUPPORTS_FILE_POSTS = true

Definition at line 707 of file HttpFunctions.php.


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