Request

Methods
8
Fields
None

Getting one

RequestBuilder.new():build()
okHttpClient:newCall(…):request()

Methods

MethodReturnsDescription
url()HttpUrlThe URL.
method()stringThe method.
header(string)string?The last value of header name, or nil.
headers(string){string}Every value of header name.
body()RequestBody?The body, or nil.
isHttps()booleanWhether the URL is https.
newBuilder()RequestBuilderA builder holding this request.
toString()stringRequest{method=GET, url=..., tags={}}.

Returned by

MethodReturnsDescription
Call.requestRequestThe request.
RequestBuilder.buildRequestThe request; without a URL it is IllegalStateException.
Response.requestRequestThe request that answered (after redirects, its URL is the final one).

Method details

headers

headers: (Request, string) -> {string}

Every value of header name.

toString

toString: (Request) -> string

Request{method=GET, url=..., tags={}}.