Http

data class Http(val scheme: String, val credentials: AuthCredential.Http.Credentials, val additionalHeaders: Map<String, Secret>? = null) : AuthCredential

An HTTP authentication credential, usually sent in the Authorization header.

Constructors

Link copied to clipboard
constructor(scheme: String, credentials: AuthCredential.Http.Credentials, additionalHeaders: Map<String, Secret>? = null)

Types

Link copied to clipboard
class Builder

Fluent builder for Http, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Link copied to clipboard
object Companion
Link copied to clipboard
data class Credentials(val username: String? = null, val password: Secret? = null, val token: Secret? = null)

What an HTTP credential authenticates with: a user name and password, or a token.

Properties

Link copied to clipboard

Extra headers to send with the request. Their values are secret.

Link copied to clipboard

The user name and password, or the token.

Link copied to clipboard

The Authorization header scheme (RFC 7235), such as basic or bearer.

Functions

Link copied to clipboard

Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.