ResultResponse

data class ResultResponse<T : Any>(val result: T, response: Response) : Response

HTTP response that includes a parsed/decoded result.

Constructors

Link copied to clipboard
fun <T : Any> ResultResponse(result: T, response: Response)

Properties

Link copied to clipboard
open override val body: BufferedSource?

HTTP response data source, if available.

Link copied to clipboard
open override val headers: Headers

HTTP response headers, if any were delivered.

Link copied to clipboard
open override val reasonPhrase: String?

HTTP status message of the response.

Link copied to clipboard
open override val request: Request

HTTP request after API rewrites and/or HTTP redirects.

Link copied to clipboard
val result: T
Link copied to clipboard
open override val statusCode: Int

HTTP status code of the response.

Link copied to clipboard
open override val trailers: Headers?

HTTP response trailers, if any were delivered.

Extensions

Link copied to clipboard

Convenience accessor for HTTP Content-Length header.

Link copied to clipboard

Convenience accessor for HTTP Content-Type header.

Link copied to clipboard

Convenience for checking if the Response.statusCode represents a successful response.