Property | Type | Description | |
---|---|---|---|
$code | integer | The HTTP code resulting from the request. | |
$content | string | The content of the response. | |
$headers | array | Request's headers. |
Method | Description | |
---|---|---|
__construct ( string $content, integer $code, array $headers = [] ) | The primary content of the response. | |
__toString ( ) : string | Returns the content of the response as a string. | |
getCode ( ) : integer | Returns the code associated with the response. | |
getHeader ( string $name ) : string | null | Return header's value by key. | |
getHeaders ( ) : array | Return array of header from response in format header key => header value. | |
hasHeader ( string $name ) : boolean | Check if header key is present |
public __toString ( ) : string | ||
return | string |
public getHeaders ( ) : array | ||
return | array |
protected int $code | ||
return | integer |