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

Class: HTTP_Response

Source Location: /HTTP_Request-1.4.4/Request.php

Class Overview


Response class to complement the Request class


Author(s):

Version:

  • Release: 1.4.4

Methods


Inherited Variables

Inherited Methods


Class Details

[line 1130]
Response class to complement the Request class


[ Top ]


Method Detail

HTTP_Response (Constructor)   [line 1198]

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

Constructor

Parameters:

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

[ Top ]

process   [line 1220]

mixed process( [bool $saveBody = true], [bool $canHaveBody = 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.
bool   $canHaveBody   —  Whether the response can actually have a message-body. Will be set to false for HEAD requests.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:26:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.