Moodle  2.2.1
http://www.collinsharper.com
SimpleHttpRequest Class Reference

Public Member Functions

 SimpleHttpRequest (&$route, $encoding)
fetch ($timeout)
 _dispatchRequest (&$socket, $encoding)
 addHeaderLine ($header_line)
 readCookiesFromJar ($jar, $url)
_createResponse (&$socket)

Data Fields

 $_route
 $_encoding
 $_headers
 $_cookies

Detailed Description

Definition at line 196 of file http.php.


Member Function Documentation

& _createResponse ( &$  socket)

Wraps the socket in a response parser.

Parameters:
SimpleSocket$socketResponding socket.
Returns:
SimpleHttpResponse Parsed response object. protected

Definition at line 281 of file http.php.

Here is the caller graph for this function:

_dispatchRequest ( &$  socket,
encoding 
)

Sends the headers.

Parameters:
SimpleSocket$socketOpen socket.
string$methodHTTP request method, usually GET.
SimpleFormEncoding$encodingContent to send with request. private

Definition at line 243 of file http.php.

Here is the caller graph for this function:

addHeaderLine ( header_line)

Adds a header line to the request.

Parameters:
string$header_lineText of full header line. public

Definition at line 260 of file http.php.

& fetch ( timeout)

Dispatches the content to the route's socket.

Parameters:
integer$timeoutConnection timeout.
Returns:
SimpleHttpResponse A response which may only have an error, but hopefully has a complete web page. public

Definition at line 226 of file http.php.

Here is the call graph for this function:

readCookiesFromJar ( jar,
url 
)

Reads all the relevant cookies from the cookie jar.

Parameters:
SimpleCookieJar$jarJar to read
SimpleUrl$urlUrl to use for scope. public

Definition at line 271 of file http.php.

SimpleHttpRequest ( &$  route,
encoding 
)

Builds the socket request from the different pieces. These include proxy information, URL, cookies, headers, request method and choice of encoding.

Parameters:
SimpleRoute$routeRequest route.
SimpleFormEncoding$encodingContent to send with request. public

Definition at line 211 of file http.php.


Field Documentation

$_cookies

Definition at line 200 of file http.php.

$_encoding

Definition at line 198 of file http.php.

$_headers

Definition at line 199 of file http.php.

$_route

Definition at line 197 of file http.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations