Static Public Member Functions | |
static | get ($url, $timeout= 'default', $opts=array()) |
Simple wrapper for Http::request( 'GET' ). | |
static | post ($url, $timeout= 'default', $opts=array()) |
Simple wrapper for Http::request( 'POST' ). | |
static | request ($method, $url, $timeout= 'default', $curlOptions=array()) |
Get the contents of a file by HTTP. | |
static | isLocalURL ($url) |
Check if the URL can be served by localhost. | |
static | userAgent () |
Return a standard user-agent we can use for external requests. |
Definition at line 13 of file HttpFunctions.php.
static Http::get | ( | $ | url, | |
$ | timeout = 'default' , |
|||
$ | opts = array() | |||
) | [static] |
Simple wrapper for Http::request( 'GET' ).
Definition at line 19 of file HttpFunctions.php.
References $url, and request().
Referenced by WikiRevision::downloadSource(), ForeignAPIRepo::fetchImageQuery(), Parser::fetchScaryTemplateMaybeFromCache(), File::getDescriptionText(), getHooksFromDoc(), getRebuildInterwikiDump(), ForeignAPIRepo::getThumbUrlFromCache(), makeInterwikiSQL(), and wfGetHTTP().
static Http::isLocalURL | ( | $ | url | ) | [static] |
Check if the URL can be served by localhost.
$url | string Full url to check |
Definition at line 126 of file HttpFunctions.php.
References $i, $url, and $wgCommandLineMode.
Referenced by wfIsLocalURL().
static Http::post | ( | $ | url, | |
$ | timeout = 'default' , |
|||
$ | opts = array() | |||
) | [static] |
Simple wrapper for Http::request( 'POST' ).
Definition at line 27 of file HttpFunctions.php.
static Http::request | ( | $ | method, | |
$ | url, | |||
$ | timeout = 'default' , |
|||
$ | curlOptions = array() | |||
) | [static] |
Get the contents of a file by HTTP.
$method | string HTTP method. Usually GET/POST | |
$url | string Full URL to act on | |
$timeout | int Seconds to timeout. 'default' falls to $wgHTTPTimeout | |
$curlOptions | array Optional array of extra params to pass to curl_setopt() |
Definition at line 39 of file HttpFunctions.php.
References $method, $text, $url, $wgHTTPProxy, $wgHTTPTimeout, $wgTitle, and wfDebug().
Referenced by get(), ImportStreamSource::newFromURL(), and post().
static Http::userAgent | ( | ) | [static] |
Return a standard user-agent we can use for external requests.
Definition at line 158 of file HttpFunctions.php.
References $wgVersion.