okhttp / okhttp3 / Headers / Builder / add

add

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.

@IgnoreJRERequirement 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.