hasStatus

fun HttpResponse.hasStatus(status: HttpStatusCode): Boolean

Returns a Boolean indicating whether the HttpResponse has the specified status code. Reusable, as we can reuse the hasStatus function to check for multiple status codes. rather than creating a single method for each status check e.g isOK,isAccepted,is.....

Return

True if the HttpResponse has the specified status code, false otherwise.

Parameters

status

The HttpStatusCode to check against the HttpResponse status.