HttpBuilder

class HttpBuilder(internalBuilder: Request.Builder) : Request.Builder

Utility class assisting with making custom HTTP requests from a client.

Constructors

Link copied to clipboard
constructor(internalBuilder: Request.Builder)

Functions

Link copied to clipboard
open override fun addHeader(name: String, value: String): HttpBuilder
Link copied to clipboard
open override fun build(): Request
Link copied to clipboard
open override fun cacheControl(cacheControl: CacheControl): HttpBuilder
Link copied to clipboard
open override fun delete(body: RequestBody?): HttpBuilder
Link copied to clipboard
open override fun get(): HttpBuilder
Link copied to clipboard
open override fun head(): HttpBuilder
Link copied to clipboard
open override fun header(name: String, value: String): HttpBuilder
Link copied to clipboard
open override fun headers(headers: Headers): HttpBuilder
Link copied to clipboard
open override fun method(method: String, body: RequestBody?): HttpBuilder
Link copied to clipboard
open override fun patch(body: RequestBody): HttpBuilder
Link copied to clipboard
fun path(path: String): HttpBuilder

Set the path for this request

Link copied to clipboard
open override fun post(body: RequestBody): HttpBuilder
Link copied to clipboard
open override fun put(body: RequestBody): HttpBuilder
Link copied to clipboard
open override fun removeHeader(name: String): HttpBuilder
Link copied to clipboard
open override fun tag(tag: Any?): HttpBuilder
open override fun <T> tag(type: Class<in T>, tag: T?): HttpBuilder
Link copied to clipboard
open override fun url(url: URL): HttpBuilder
open override fun url(url: String): HttpBuilder
open override fun url(url: HttpUrl): HttpBuilder