trait DeterminesStatusCode

Methods

bool
ok()

Determine if the response code was 200 "OK" response.

bool
created()

Determine if the response code was 201 "Created" response.

bool
accepted()

Determine if the response code was 202 "Accepted" response.

bool
noContent(int $status = 204)

Determine if the response code was the given status code and the body has no content.

bool
movedPermanently()

Determine if the response code was a 301 "Moved Permanently".

bool
found()

Determine if the response code was a 302 "Found" response.

bool
notModified()

Determine if the response code was a 304 "Not Modified" response.

bool
badRequest()

Determine if the response was a 400 "Bad Request" response.

bool
unauthorized()

Determine if the response was a 401 "Unauthorized" response.

bool
paymentRequired()

Determine if the response was a 402 "Payment Required" response.

bool
forbidden()

Determine if the response was a 403 "Forbidden" response.

bool
notFound()

Determine if the response was a 404 "Not Found" response.

bool
requestTimeout()

Determine if the response was a 408 "Request Timeout" response.

bool
conflict()

Determine if the response was a 409 "Conflict" response.

bool
unprocessableContent()

Determine if the response was a 422 "Unprocessable Content" response.

bool
unprocessableEntity()

Determine if the response was a 422 "Unprocessable Content" response.

bool
tooManyRequests()

Determine if the response was a 429 "Too Many Requests" response.

Details

at line 12
bool ok()

Determine if the response code was 200 "OK" response.

Return Value

bool

at line 20
bool created()

Determine if the response code was 201 "Created" response.

Return Value

bool

at line 28
bool accepted()

Determine if the response code was 202 "Accepted" response.

Return Value

bool

at line 36
bool noContent(int $status = 204)

Determine if the response code was the given status code and the body has no content.

Parameters

int $status

Return Value

bool

at line 44
bool movedPermanently()

Determine if the response code was a 301 "Moved Permanently".

Return Value

bool

at line 52
bool found()

Determine if the response code was a 302 "Found" response.

Return Value

bool

at line 60
bool notModified()

Determine if the response code was a 304 "Not Modified" response.

Return Value

bool

at line 68
bool badRequest()

Determine if the response was a 400 "Bad Request" response.

Return Value

bool

at line 76
bool unauthorized()

Determine if the response was a 401 "Unauthorized" response.

Return Value

bool

at line 84
bool paymentRequired()

Determine if the response was a 402 "Payment Required" response.

Return Value

bool

at line 92
bool forbidden()

Determine if the response was a 403 "Forbidden" response.

Return Value

bool

at line 100
bool notFound()

Determine if the response was a 404 "Not Found" response.

Return Value

bool

at line 108
bool requestTimeout()

Determine if the response was a 408 "Request Timeout" response.

Return Value

bool

at line 116
bool conflict()

Determine if the response was a 409 "Conflict" response.

Return Value

bool

at line 124
bool unprocessableContent()

Determine if the response was a 422 "Unprocessable Content" response.

Return Value

bool

at line 132
bool unprocessableEntity()

Determine if the response was a 422 "Unprocessable Content" response.

Return Value

bool

at line 140
bool tooManyRequests()

Determine if the response was a 429 "Too Many Requests" response.

Return Value

bool