Static Public Member Functions | |
static | request ($method, $url, $options=array()) |
Perform an HTTP request. | |
static | get ($url, $timeout= 'default', $options=array()) |
Simple wrapper for Http::request( 'GET' ). | |
static | post ($url, $options=array()) |
Simple wrapper for Http::request( 'POST' ). | |
static | isLocalURL ($url) |
Check if the URL can be served by localhost. | |
static | userAgent () |
A standard user-agent we can use for external requests. | |
static | isValidURI ($uri) |
Checks that the given URI is a valid one. | |
Static Public Attributes | |
static | $httpEngine = false |
Definition at line 10 of file HttpFunctions.php.
static Http::get | ( | $ | url, | |
$ | timeout = 'default' , |
|||
$ | options = array() | |||
) | [static] |
Simple wrapper for Http::request( 'GET' ).
Definition at line 48 of file HttpFunctions.php.
References $options, $url, and request().
Referenced by WikiRevision::downloadSource(), ExternalStoreHttp::fetchFromURL(), ForeignAPIRepo::fetchImageQuery(), Parser::fetchScaryTemplateMaybeFromCache(), File::getDescriptionText(), getFileCommentFromSourceWiki(), getFileUserFromSourceWiki(), FindHooks::getHooksFromDoc(), getRebuildInterwikiDump(), ForeignAPIRepo::getThumbUrlFromCache(), makeInterwikiSQL(), HttpTest::runHTTPGets(), ApiTest::testApi(), 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 66 of file HttpFunctions.php.
References $i, $url, and $wgCommandLineMode.
Referenced by HttpRequest::proxySetup(), and wfIsLocalURL().
static Http::isValidURI | ( | $ | uri | ) | [static] |
Checks that the given URI is a valid one.
$uri | Mixed: URI to check for validity |
Definition at line 109 of file HttpFunctions.php.
Referenced by HttpRequest::__construct().
static Http::post | ( | $ | url, | |
$ | options = array() | |||
) | [static] |
Simple wrapper for Http::request( 'POST' ).
Definition at line 57 of file HttpFunctions.php.
References $options, $url, and request().
Referenced by HttpTest::runHTTPPosts(), ApiTest::testApiLoginBadPass(), ApiTest::testApiLoginGoodPass(), and ApiTest::testApiLoginNoName().
static Http::request | ( | $ | method, | |
$ | url, | |||
$ | options = array() | |||
) | [static] |
Perform an HTTP request.
$method | string HTTP method. Usually GET/POST | |
$url | string Full URL to act on | |
$options | options to pass to HttpRequest object Possible keys for the array: timeout Timeout length in seconds postData An array of key-value pairs or a url-encoded form data proxy The proxy to use. Will use $wgHTTPProxy (if set) otherwise. noProxy Override $wgHTTPProxy (if set) and don't use any proxy at all. sslVerifyHost (curl only) Verify the SSL certificate caInfo (curl only) Provide CA information maxRedirects Maximum number of redirects to follow (defaults to 5) followRedirects Whether to follow redirects (defaults to true) |
Definition at line 29 of file HttpFunctions.php.
References $options, $url, HttpRequest::factory(), and wfDebug().
Referenced by get(), ImportStreamSource::newFromURL(), post(), and HttpTest::runHTTPRequests().
static Http::userAgent | ( | ) | [static] |
A standard user-agent we can use for external requests.
Definition at line 99 of file HttpFunctions.php.
References $wgVersion.
Referenced by HttpRequest::execute(), and SquidPurgeClient::queuePurge().
Http::$httpEngine = false [static] |
Definition at line 11 of file HttpFunctions.php.
Referenced by HttpRequest::factory(), HttpTest::runHTTPFailureChecks(), HttpTest::runHTTPGets(), HttpTest::runHTTPPosts(), HttpTest::runHTTPRequests(), HttpTest::testCookieRequestCurl(), HttpTest::testCookieRequestDefault(), HttpTest::testCookieRequestPhp(), HttpTest::testFailureCurl(), HttpTest::testFailureDefault(), HttpTest::testFailurePhp(), HttpTest::testGetCurl(), HttpTest::testGetDefault(), HttpTest::testGetPhp(), HttpTest::testInstantiation(), HttpTest::testPostCurl(), HttpTest::testPostDefault(), HttpTest::testPostPhp(), HttpTest::testProxyCurl(), HttpTest::testProxyDefault(), HttpTest::testProxyPhp(), HttpTest::testRequestCurl(), HttpTest::testRequestDefault(), and HttpTest::testRequestPhp().