okhttp / okhttp3 / Request

Request

class Request

An HTTP request. Instances of this class are immutable if their body is null or itself immutable.

Types

Builder

class Builder

Properties

body

val body: RequestBody?

cacheControl

val cacheControl: CacheControl

Returns the cache control directives for this response. This is never null, even if this response contains no Cache-Control header.

headers

val headers: Headers

isHttps

val isHttps: Boolean

method

val method: String

url

val url: HttpUrl

Functions

header

fun header(name: String): String?

headers

fun headers(name: String): List<String>

newBuilder

fun newBuilder(): Request.Builder

tag

fun tag(): Any?

Returns the tag attached with Object.class as a key, or null if no tag is attached with that key.

fun <T> tag(type: Class<out T>): T?

Returns the tag attached with type as a key, or null if no tag is attached with that key.

toString

fun toString(): String