NetworkResponse
@Poko
Represents an HTTP response.
Parameters
code
The HTTP response code.
requestMillis
Timestamp of when the request was sent.
responseMillis
Timestamp of when the response was received.
headers
The HTTP headers.
body
The HTTP response body.
delegate
The underlying response instance. If executed by OkHttp, this is okhttp3.Response
. If executed by Ktor, this is io.ktor.client.statement.HttpResponse
. If returned from the cache (or any other method), this is null
.
Constructors
Link copied to clipboard
constructor(code: Int = HTTP_RESPONSE_OK, requestMillis: Long = 0, responseMillis: Long = 0, headers: NetworkHeaders = NetworkHeaders.EMPTY, body: NetworkResponseBody? = null, delegate: Any? = null)
Properties
Functions
Link copied to clipboard
fun copy(code: Int = this.code, requestMillis: Long = this.requestMillis, responseMillis: Long = this.responseMillis, headers: NetworkHeaders = this.headers, body: NetworkResponseBody? = this.body, delegate: Any? = this.delegate): NetworkResponse