\Pop\Http\ResponseParser

HTTP response parser class

Summary

Methods
Properties
Constants
parseFromUri()
parseFromString()
encodeBody()
decodeBody()
decodeChunkedBody()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

parseFromUri()

parseFromUri(string  $uri, string  $method = 'GET', string  $mode = 'r', array  $options = array()) : \Pop\Http\Response

Parse a response from a URI

Parameters

string $uri
string $method
string $mode
array $options

Returns

\Pop\Http\Response

parseFromString()

parseFromString(string  $responseString) : \Pop\Http\Response

Parse a response from a full response string

Parameters

string $responseString

Throws

\Pop\Http\Response\Exception

Returns

\Pop\Http\Response

encodeBody()

encodeBody(string  $body, string  $encode = 'gzip') : string

Encode the body data

Parameters

string $body
string $encode

Throws

\Pop\Http\Response\Exception

Returns

string

decodeBody()

decodeBody(string  $body, string  $decode = 'gzip') : string

Decode the body data

Parameters

string $body
string $decode

Throws

\Pop\Http\Response\Exception

Returns

string

decodeChunkedBody()

decodeChunkedBody(string  $body) : string

Decode a chunked transfer-encoded body and return the decoded text

Parameters

string $body

Returns

string