setHeader

open fun setHeader(key: String, value: String): LazyHeaders.Builder

Replaces all existing LazyHeaderFactorys for the given key with the given LazyHeaderFactory.

If the given value is null, the header at the given key will be removed.

Use setHeader if obtaining the value requires I/O (i.e. an OAuth token).


open fun setHeader(key: String, factory: LazyHeaderFactory): LazyHeaders.Builder

Replaces all existing LazyHeaderFactorys for the given key with the given LazyHeaderFactory.

If the given value is null, the header at the given key will be removed.