|
MediaWiki
1.23.0
|
Various HTTP related functions. More...
Static Public Member Functions | |
| static | get ( $url, $timeout='default', $options=array()) |
| Simple wrapper for Http::request( 'GET' ) More... | |
| static | isLocalURL ( $url) |
| Check if the URL can be served by localhost. More... | |
| static | isValidURI ( $uri) |
| Checks that the given URI is a valid one. More... | |
| static | post ( $url, $options=array()) |
| Simple wrapper for Http::request( 'POST' ) More... | |
| static | request ( $method, $url, $options=array()) |
| Perform an HTTP request. More... | |
| static | userAgent () |
| A standard user-agent we can use for external requests. More... | |
Static Public Attributes | |
| static | $httpEngine = false |
Various HTTP related functions.
Definition at line 32 of file HttpFunctions.php.
Simple wrapper for Http::request( 'GET' )
| $url | |
| $timeout | string |
| $options | array |
Definition at line 93 of file HttpFunctions.php.
References $options, and request().
Referenced by Installer\dirIsExecutable(), bench_HTTP_HTTPS\doRequest(), WikiRevision\downloadSource(), ImportSiteScripts\execute(), ExternalStoreHttp\fetchFromURL(), ImportSiteScripts\fetchScriptList(), File\getDescriptionText(), getFileCommentFromSourceWiki(), getFileUserFromSourceWiki(), FindHooks\getHooksFromOnlineDoc(), and MediaWikiSite\normalizePageName().
|
static |
Check if the URL can be served by localhost.
| string | $url | full url to check |
Definition at line 116 of file HttpFunctions.php.
References $matches, $wgCommandLineMode, array(), and global.
Referenced by MWHttpRequest\proxySetup().
|
static |
Checks that the given URI is a valid one.
Hardcoding the protocols, because we only want protocols that both cURL and php support.
file:// should not be allowed here for security purpose (r67684)
| $uri | Mixed: URI to check for validity |
Definition at line 172 of file HttpFunctions.php.
Referenced by MWHttpRequest\__construct(), PhpHttpRequest\execute(), UploadFromUrl\fetchFile(), SideBarTest\initMessagesHref(), UploadFromUrl\isValidRequest(), and HttpTest\testIsValidUri().
|
static |
Simple wrapper for Http::request( 'POST' )
| $url | |
| $options | array |
Definition at line 106 of file HttpFunctions.php.
|
static |
Perform an HTTP request.
| string | $method | HTTP method. Usually GET/POST |
| string | $url | full URL to act on. If protocol-relative, will be expanded to an http:// URL |
| array | $options | options to pass to MWHttpRequest object. Possible keys for the array:
|
Definition at line 60 of file HttpFunctions.php.
References $options, MWHttpRequest\factory(), wfDebug(), wfProfileIn(), and wfProfileOut().
Referenced by FileBackendTest\doTestGetFileHttpUrl(), get(), ImportStreamSource\newFromURL(), and post().
|
static |
A standard user-agent we can use for external requests.
Definition at line 155 of file HttpFunctions.php.
References global.
Referenced by MWHttpRequest\execute(), ForeignAPIRepo\getUserAgent(), and SquidPurgeClient\queuePurge().
|
static |
Definition at line 33 of file HttpFunctions.php.
Referenced by MWHttpRequestTester\factory(), and MWHttpRequest\factory().