Class SimpleHttpRequest

Description

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

Located in /http.php (line 197)


	
			
Method Summary
 SimpleHttpRequest __construct (SimpleRoute $route, SimpleFormEncoding $encoding)
 void addHeaderLine (string $header_line)
 void dispatchRequest (SimpleSocket $socket, SimpleFormEncoding $encoding, string $method)
 SimpleHttpResponse fetch (integer $timeout)
Methods
Constructor __construct (line 212)

Builds the socket request from the different pieces.

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

  • access: public
SimpleHttpRequest __construct (SimpleRoute $route, SimpleFormEncoding $encoding)
  • SimpleRoute $route: Request route.
  • SimpleFormEncoding $encoding: Content to send with request.
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.
createResponse (line 281)

Wraps the socket in a response parser.

  • return: Parsed response object.
  • access: protected
SimpleHttpResponse createResponse (SimpleSocket $socket)
dispatchRequest (line 243)

Sends the headers.

  • access: protected
void dispatchRequest (SimpleSocket $socket, SimpleFormEncoding $encoding, string $method)
  • SimpleSocket $socket: Open socket.
  • string $method: HTTP request method, usually GET.
  • SimpleFormEncoding $encoding: Content to send with request.
fetch (line 227)

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)

Documentation generated on Sun, 31 Oct 2010 16:31:38 -0500 by phpDocumentor 1.4.3