MediaWiki REL1_32
|
Class to let us overwrite MWHttpRequest respHeaders variable. More...
Static Public Member Functions | |
static | factory ( $url, array $options=null, $caller=__METHOD__) |
Generate a new request object Deprecated: | |
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() | |
Additional Inherited Members | |
Public Member Functions inherited from MWHttpRequest | |
__construct ( $url, array $options=[], $caller=__METHOD__, $profiler=null) | |
canFollowRedirects () | |
Returns true if the backend can follow redirects. | |
execute () | |
Take care of whatever is necessary to perform the URI request. | |
getContent () | |
Get the body, or content, of the response to the request. | |
getCookieJar () | |
Returns the cookie jar in use. | |
getFinalUrl () | |
Returns the final URL after all redirections. | |
getResponseHeader ( $header) | |
Returns the value of the given response header. | |
getResponseHeaders () | |
Returns an associative array of response headers after the request has been executed. | |
getStatus () | |
Get the integer value of the HTTP status code (e.g. | |
isRedirect () | |
Returns true if the last status code was a redirect. | |
read ( $fh, $content) | |
A generic callback to read the body of the response from a remote server. | |
setCallback ( $callback) | |
Set a read callback to accept data read from the HTTP request. | |
setCookie ( $name, $value, $attr=[]) | |
Sets a cookie. | |
setCookieJar ( $jar) | |
Tells the MWHttpRequest object to use this pre-loaded CookieJar. | |
setData ( $args) | |
Set the parameters of the request. | |
setHeader ( $name, $value) | |
Set an arbitrary header. | |
setLogger (LoggerInterface $logger) | |
setOriginalRequest ( $originalRequest) | |
Set information about the original request. | |
setUserAgent ( $UA) | |
Set the user agent. | |
Public Attributes inherited from MWHttpRequest | |
const | SUPPORTS_FILE_POSTS = false |
Protected Member Functions inherited from MWHttpRequest | |
getHeaderList () | |
Get an array of the headers. | |
parseCookies () | |
Parse the cookies in the response headers and store them in the cookie jar. | |
parseHeader () | |
Parses the headers, including the HTTP status code and any Set-Cookie headers. | |
prepare () | |
proxySetup () | |
Take care of setting up the proxy (do nothing if "noProxy" is set) | |
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). | |
Protected Attributes inherited from MWHttpRequest | |
$caInfo = null | |
callable | $callback |
$connectTimeout | |
$content | |
CookieJar | $cookieJar |
$followRedirects = false | |
$headerList = [] | |
$headersOnly = null | |
LoggerInterface | $logger |
$maxRedirects = 5 | |
$method = "GET" | |
$noProxy = false | |
$parsedUrl | |
$postData = null | |
string | $profileName |
Profiler | $profiler |
$proxy = null | |
$reqHeaders = [] | |
$respHeaders = [] | |
$respStatus = "200 Ok" | |
$respVersion = "0.9" | |
$sslVerifyCert = true | |
$sslVerifyHost = true | |
StatusValue | $status |
int string | $timeout = 'default' |
$url | |
Class to let us overwrite MWHttpRequest respHeaders variable.
Definition at line 511 of file HttpTest.php.
|
static |
Generate a new request object Deprecated:
string | $url | Url to use |
array | null | $options | (optional) extra params to pass (see Http::request()) |
string | $caller | The method making this request, for profiling |
DomainException |
Reimplemented from MWHttpRequest.
Definition at line 514 of file HttpTest.php.
References Http\$httpEngine, $options, MWHttpRequest\$url, and wfIniGetBool().
Referenced by HttpTest\testRelativeRedirections().