PHP Класс PicoFeed\Client\Stream

Автор: Frederic Guillot
Наследование: extends PicoFeed\Client\Client
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
decodeBody ( string $body, PicoFeed\Client\HttpHeaders $headers ) : string Decode body response according to the HTTP headers.
decodeChunked ( string $str ) : string Decode a chunked body.
doRequest ( ) : array Do the HTTP request.

Приватные методы

Метод Описание
prepareContext ( ) : array Prepare stream context.
prepareHeaders ( ) : string[] Prepare HTTP headers.
setEffectiveUrl ( array $headers ) Construct the final URL from location headers.

Описание методов

decodeBody() публичный Метод

Decode body response according to the HTTP headers.
public decodeBody ( string $body, PicoFeed\Client\HttpHeaders $headers ) : string
$body string Raw body
$headers PicoFeed\Client\HttpHeaders HTTP headers
Результат string

decodeChunked() публичный Метод

Decode a chunked body.
public decodeChunked ( string $str ) : string
$str string Raw body
Результат string Decoded body

doRequest() публичный Метод

Do the HTTP request.
public doRequest ( ) : array
Результат array HTTP response ['body' => ..., 'status' => ..., 'headers' => ...]