Request

constructor(url: HttpUrl, headers: Headers = headersOf(), method: String = "", body: RequestBody? = null)

Constructs a new request.

Use Builder for more fluent construction, including helper methods for various HTTP methods.

Parameters

method

defaults to "GET" if body is null, and "POST" otherwise.