Свойство | Тип | Описание | |
---|---|---|---|
$body | Contains response body | ||
$charset | |||
$chunkcb | callback | ||
$chunked | boolean | ||
$contentLength | Content length | ||
$contentType | |||
$cookie | Associative array of Cookies | ||
$eofTerminated | |||
$headers | Associative array of headers | ||
$lastURL | Last requested URL | ||
$protocolError | integer | ||
$rawHeaders | Raw headers array | ||
$reqType | string | ||
$responseCode | integer |
Свойство | Тип | Описание | |
---|---|---|---|
$EOL | End of line | ||
$curChunk | string | ||
$curChunkSize | Size of current chunk | ||
$requests | SplStack |
Метод | Описание | |
---|---|---|
get ( string $url, array $params = null ) | Perform a GET request | |
getBody ( ) : string | Get body | |
getHeader ( string $name ) : string | Get header | |
getHeaders ( ) : array | Get headers | |
head ( string $url, array $params = null ) | Perform a HEAD request | |
onFinish ( ) | Called when connection finishes | |
onRead ( ) | Called when new data received | |
post ( string $url, array $data = [], array $params = null ) | Perform a POST request |
Метод | Описание | |
---|---|---|
customRequestHeaders ( array $headers ) | ||
init ( ) | Constructor | |
requestFinished ( ) | Called when request is finished | |
sendRequestHeaders ( $type, $url, &$params ) : void | Send request headers |
protected customRequestHeaders ( array $headers ) | ||
$headers | array |
protected sendRequestHeaders ( $type, $url, &$params ) : void | ||
$type | ||
$url | ||
Результат | void |