Http Class Reference
[HTTP]

Various HTTP related functions. More...

List of all members.

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.


Detailed Description

Various HTTP related functions.

Definition at line 13 of file HttpFunctions.php.


Member Function Documentation

static Http::get ( url,
timeout = 'default',
opts = 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 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' ).

See also:
Http::request()

Definition at line 27 of file HttpFunctions.php.

References $url, and request().

static Http::request ( method,
url,
timeout = 'default',
curlOptions = array() 
) [static]

Get the contents of a file by HTTP.

Parameters:
$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.


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

Generated on Sat Sep 5 02:08:38 2009 for MediaWiki by  doxygen 1.5.9