ResponseInterface wrapper for a PSR-7 response.
More...
|
| __construct (Psr7ResponseInterface $response) |
|
| getDecoratedResponse () |
| Return the original PSR-7 response being decorated.
|
|
| getBody () |
| Retrieve the response body.- Returns
- string
|
|
| getStatusCode () |
| Retrieve the HTTP response status code.- Returns
- int
|
|
| getHeaderLine ($name, $default=null) |
| Retrieve a header (as a single line) from the response.Header name lookups MUST be case insensitive.Since the only header values the feed reader consumes are singular in nature, this method is expected to return a string, and not an array of values.- Parameters
-
string | $name | Header name to retrieve. |
mixed | $default | Default value to use if header is not present. |
- Returns
- string
|
|
ResponseInterface wrapper for a PSR-7 response.
__construct |
( |
Psr7ResponseInterface |
$response | ) |
|
- Parameters
-
Psr7ResponseInterface | $response | |
Return the original PSR-7 response being decorated.
- Returns
- Psr7ResponseInterface
getHeaderLine |
( |
|
$name, |
|
|
|
$default = null |
|
) |
| |
Retrieve a header (as a single line) from the response.Header name lookups MUST be case insensitive.Since the only header values the feed reader consumes are singular in nature, this method is expected to return a string, and not an array of values.
- Parameters
-
string | $name | Header name to retrieve. |
mixed | $default | Default value to use if header is not present. |
- Returns
- string
Implements HeaderAwareResponseInterface.