apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: HTTP_Response

Source Location: /HTTP_Request-1.3.0/Request.php

Class Overview


Response class to complement the Request class


Methods


Inherited Variables

Inherited Methods


Class Details

[line 941]
Response class to complement the Request class


[ Top ]


Method Detail

HTTP_Response (Constructor)   [line 998]

mixed HTTP_Response( object Net_Socket &$sock, array &$listeners)

Constructor
  • Return: PEAR Error on error, true otherwise

Parameters:

object Net_Socket   &$sock   —  socket to read the response from
array   &$listeners   —  listeners attached to request

[ Top ]

process   [line 1018]

mixed process( [bool $saveBody = true])

Processes a HTTP response

This extracts response code, headers, cookies and decodes body if it was encoded in some way

  • Return: true on success, PEAR_Error in case of malformed response
  • Throws: PEAR_Error
  • Access: public

Parameters:

bool   $saveBody   —  Whether to store response body in object property, set this to false if downloading a LARGE file and using a Listener. This is assumed to be true if body is gzip-encoded.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:10:29 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.