Documentation

HttpResponse
in package

Read onlyYes
FinalYes

Normalized outbound HTTP response returned by {@see HttpClient}.

Table of Contents

Properties

$body  : string
$headers  : array<string|int, mixed>
$status  : int

Methods

__construct()  : mixed
json()  : array<string|int, mixed>
Decode the body as JSON.
ok()  : bool

Properties

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
throws
MiddagInfrastructureException

when the body is not valid JSON

Return values
array<string|int, mixed>
On this page

Search results