Http Class Reference
[HTTP]

Various HTTP related functions. More...

List of all members.

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


Detailed Description

Various HTTP related functions.

Definition at line 10 of file HttpFunctions.php.


Member Function Documentation

static Http::get ( url,
timeout = 'default',
options = array() 
) [static]

static Http::isLocalURL ( url  )  [static]

Check if the URL can be served by localhost.

Parameters:
$url string Full url to check
Returns:
bool

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.

Parameters:
$uri Mixed: URI to check for validity
Returns:
bool

Definition at line 109 of file HttpFunctions.php.

Referenced by HttpRequest::__construct().

static Http::post ( url,
options = array() 
) [static]

static Http::request ( method,
url,
options = array() 
) [static]

Perform an HTTP request.

Parameters:
$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)
Returns:
mixed (bool)false on failure or a string on success

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.

Returns:
string

Definition at line 99 of file HttpFunctions.php.

References $wgVersion.

Referenced by HttpRequest::execute(), and SquidPurgeClient::queuePurge().


Member Data Documentation

Http::$httpEngine = false [static]


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

Generated on Sat Apr 30 22:57:39 2011 for MediaWiki by  doxygen 1.5.9