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

isHttps

val isHttps: Boolean

Functions

body

fun body(): RequestBody?

cacheControl

fun cacheControl(): CacheControl

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

header

fun header(name: String): String?

headers

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

method

fun method(): 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

url

fun url(): HttpUrl