Метод | Описание | |
---|---|---|
getBody ( ) : string | Get response body. | |
getHeader ( string $header ) : string | Get response header. | |
getHeaders ( ) : array | Get all response headers. | |
getStatusCode ( ) : string | Get response status code. | |
getStatusMessage ( ) : string | Get response status message. | |
send ( ) | Send the request. | |
setAuthentication ( string $user, string $password, string $type = self::AUTH_TYPE_BASIC ) | Set authentication. | |
setBody ( string $body ) | Set request body. | |
setHeader ( string $header, $value ) | Set request header. | |
setHeaders ( array $headers ) | Set request headers. | |
setHost ( string $host ) | Set request host. | |
setMethod ( string $method ) | Set request method. | |
setResource ( string $resource ) | Set request resource url. |
public getHeaders ( ) : array | ||
Результат | array | Associative array with $header => $value (value can be an array if it hasn't a single value) |
public getStatusCode ( ) : string | ||
Результат | string |
public getStatusMessage ( ) : string | ||
Результат | string |
public setHeaders ( array $headers ) | ||
$headers | array | Associative array with $header => $value (value can be an array if it hasn't a single value) |
public setResource ( string $resource ) | ||
$resource | string |