Class representing an HTTP response.
The body of the response as a ByteArray.
The headers of the response as a Map where the key is the header name and the value is the header value.
Checks if the status code of the response is in the range 200..299, which indicates a successful response.
The length of the response body.
The status code of the response.
Converts the body of the response, which is a ByteArray, to a String (UTF-8). This is useful for cases where the response body is expected to be text.
This function is used to deserialize the JSON response body into an object of type T. The function is inline and reified, which means it can safely use the generic type T at runtime.
T