Response

constructor(request: Request, code: Int, message: String, responseBody: ByteArray?, headers: Map<String, List<String>>, cookies: Map<String, String>, error: Exception?, time: Long, redirects: Int)

Parameters

request

The Request that generated this response

code

The response code

message

The response message

responseBody

The response body

headers

The response headers

cookies

The response cookies

error

The error if any (null if no error)

time

The time it took to get the response (in milliseconds)

redirects

The number of redirects