Class SimpleHttpResponse

Description

Basic HTTP response.

Located in /libraries/pear/simpletest/http.php (line 726)

StickyError
   |
   --SimpleHttpResponse
Variable Summary
 mixed $_content
 mixed $_headers
 mixed $_method
 mixed $_sent
 mixed $_url
Method Summary
 SimpleHttpResponse SimpleHttpResponse (SimpleSocket &$socket, string $method, SimpleUrl $url, [mixed $request_data = ''])
 string getContent ()
 SimpleHeaders getHeaders ()
 string getMethod ()
 array getNewCookies ()
 mixed getRequestData ()
 string getSent ()
 boolean _isLastPacket (string $packet)
 void _parse (string $raw)
 string _readAll (SimpleSocket &$socket)
Variables
mixed $_content (line 731)
mixed $_headers (line 732)
mixed $_method (line 727)
mixed $_request_data (line 729)
mixed $_sent (line 730)
mixed $_url (line 728)

Inherited Variables

Inherited from StickyError

StickyError::$_error
Methods
Constructor SimpleHttpResponse (line 744)

Constructor. Reads and parses the incoming content and headers.

  • access: public
SimpleHttpResponse SimpleHttpResponse (SimpleSocket &$socket, string $method, SimpleUrl $url, [mixed $request_data = ''])
  • SimpleSocket $socket: Network connection to fetch response text from.
  • string $method: HTTP request method.
  • SimpleUrl $url: Resource name.
  • mixed $request_data: Record of content sent.
getContent (line 816)

Accessor for the content after the last header line.

  • return: All content.
  • access: public
string getContent ()
getHeaders (line 826)

Accessor for header block. The response is the combination of this and the content.

  • return: Wrapped header block.
  • access: public
SimpleHeaders getHeaders ()
getMethod (line 779)

Original request method.

  • return: GET, POST or HEAD.
  • access: public
string getMethod ()
getNewCookies (line 835)

Accessor for any new cookies.

  • return: List of new cookies.
  • access: public
array getNewCookies ()
getRequestData (line 797)

Original request data.

  • return: Sent content.
  • access: public
mixed getRequestData ()
getSent (line 806)

Raw request that was sent down the wire.

  • return: Bytes actually sent.
  • access: public
string getSent ()
getUrl (line 788)

Resource name.

  • return: Current url.
  • access: public
SimpleUrl getUrl ()
_isLastPacket (line 862)

Test to see if the packet from the socket is the last one.

  • return: True if empty or EOF.
  • access: private
boolean _isLastPacket (string $packet)
  • string $packet: Chunk to interpret.
_parse (line 764)

Splits up the headers and the rest of the content.

  • access: private
void _parse (string $raw)
  • string $raw: Content to parse.
_readAll (line 847)

Reads the whole of the socket output into a single string.

  • return: Raw output if successful else false.
  • access: private
string _readAll (SimpleSocket &$socket)

Inherited Methods

Inherited From StickyError

 StickyError::StickyError()
 StickyError::getError()
 StickyError::isError()
 StickyError::_clearError()
 StickyError::_setError()

Documentation generated on Fri, 10 Dec 2004 18:25:35 +0000 by phpDocumentor 1.3.0RC3