Builder

class Builder

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Add an header line containing a field name, a literal colon, and a value.

fun add(name: String, value: <Error class: unknown class>): <Error class: unknown class>

Add a header with the specified name and formatted date. Does validation of header names and value.

fun add(name: String, value: <Error class: unknown class>): <Error class: unknown class>

Add a header with the specified name and formatted instant. Does validation of header names and value.

fun add(name: String, value: String): Headers.Builder

Add a header with the specified name and value. Does validation of header names and values.

Link copied to clipboard

Adds all headers from an existing collection.

Link copied to clipboard

Add a header with the specified name and value. Does validation of header names, allowing non-ASCII values.

Link copied to clipboard
fun build(): Headers
Link copied to clipboard
operator fun get(name: String): String?

Equivalent to build().get(name), but potentially faster.

Link copied to clipboard
Link copied to clipboard
operator fun set(name: String, value: <Error class: unknown class>): <Error class: unknown class>

Set a field with the specified date. If the field is not found, it is added. If the field is found, the existing values are replaced.

operator fun set(name: String, value: <Error class: unknown class>): <Error class: unknown class>

Set a field with the specified instant. If the field is not found, it is added. If the field is found, the existing values are replaced.

operator fun set(name: String, value: String): Headers.Builder

Set a field with the specified value. If the field is not found, it is added. If the field is found, the existing values are replaced.