class Builder
Builder() |
fun add(line: String): Headers.Builder
Add an header line containing a field name, a literal colon, and a 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. fun add(name: String, value: Date): Headers.Builder
Add a header with the specified name and formatted date. Does validation of header names and value. fun add(name: String, value: Instant): Headers.Builder
Add a header with the specified name and formatted instant. Does validation of header names and value. |
|
fun addAll(headers: Headers): Headers.Builder
Adds all headers from an existing collection. |
|
fun addUnsafeNonAscii(name: String, value: String): Headers.Builder
Add a header with the specified name and value. Does validation of header names, allowing non-ASCII values. |
|
fun build(): Headers |
|
operator fun get(name: String): String?
Equivalent to |
|
fun removeAll(name: String): Headers.Builder |
|
operator fun set(name: String, value: Date): Headers.Builder
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: Instant): Headers.Builder
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. |