HttpResponse
in package
Read onlyYes
FinalYes
Normalized outbound HTTP response returned by {@see HttpClient}.
Table of Contents
Properties
Methods
- __construct() : mixed
- json() : array<string|int, mixed>
- Decode the body as JSON.
- ok() : bool
Properties
$body
public
string
$body
$headers
public
array<string|int, mixed>
$headers
$status
public
int
$status
Methods
__construct()
public
__construct(int $status, array<string, mixed> $headers, string $body) : mixed
Parameters
- $status : int
- $headers : array<string, mixed>
- $body : string
json()
Decode the body as JSON.
public
json() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>ok()
public
ok() : bool