Comments: on this page. Click to read or post your own.

Class SimpleHttpRequest

Description

HTTP request for a web page. Factory for HttpResponse object.

Located in /sapphire/dev/simpletest/http.php (line 196)


	
			
Variable Summary
mixed $_cookies
mixed $_encoding
mixed $_headers
mixed $_route
Method Summary
SimpleHttpRequest SimpleHttpRequest ( &$route, SimpleFormEncoding $encoding, SimpleRoute $route)
void addHeaderLine (string $header_line)
SimpleHttpResponse &fetch (integer $timeout)
Variables
mixed $_cookies (line 200)
mixed $_encoding (line 198)
mixed $_headers (line 199)
mixed $_route (line 197)
Methods
Constructor SimpleHttpRequest (line 211)

Builds the socket request from the different pieces.

These include proxy information, URL, cookies, headers, request method and choice of encoding.

  • access: public
SimpleHttpRequest SimpleHttpRequest ( &$route, SimpleFormEncoding $encoding, SimpleRoute $route)
  • SimpleRoute $route: Request route.
  • SimpleFormEncoding $encoding: Content to send with request.
  • &$route
addHeaderLine (line 260)

Adds a header line to the request.

  • access: public
void addHeaderLine (string $header_line)
  • string $header_line: Text of full header line.
fetch (line 226)

Dispatches the content to the route's socket.

  • return: A response which may only have an error, but hopefully has a complete web page.
  • access: public
SimpleHttpResponse &fetch (integer $timeout)
  • integer $timeout: Connection timeout.
readCookiesFromJar (line 271)

Reads all the relevant cookies from the cookie jar.

  • access: public
void readCookiesFromJar (SimpleCookieJar $jar, SimpleUrl $url)
_createResponse (line 281)

Wraps the socket in a response parser.

  • return: Parsed response object.
  • access: protected
SimpleHttpResponse &_createResponse ( &$socket, SimpleSocket $socket)
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:42:11 +1300 by phpDocumentor 1.3.2