DefaultRequestBuilder
Configuration object for DefaultRequestBuilder plugin
Functions
Link copied to clipboard
Appends the Accept
header with a specific contentType.
Link copied to clipboard
Appends the HttpHeaders.Authorization to Basic Authorization with the provided username and password. For advanced configuration use the io.ktor:ktor-client-auth
plugin.
Link copied to clipboard
Appends the HttpHeaders.Authorization to Bearer Authorization with the provided token. For advanced configuration use the io.ktor:ktor-client-auth
plugin.
Link copied to clipboard
fun HttpMessageBuilder.cookie(name: String, value: String, maxAge: Int = 0, expires: GMTDate? = null, domain: String? = null, path: String? = null, secure: Boolean = false, httpOnly: Boolean = false, extensions: Map<String, String?> = emptyMap())
Appends a single header of key with a specific value if the value is not null.
Link copied to clipboard
Executes a block that configures the HeadersBuilder associated to this request.
Link copied to clipboard
Sets attributes using block.
Link copied to clipboard
Executes a block that configures the URLBuilder associated to this request.
Sets the HttpRequestBuilder.url from urlString.