Builder
Adds an LazyHeaderFactory that will be used to construct a value for the given key* lazily on a background thread.
This class is not thread safe.
This class may include default values for User-Agent and Accept-Encoding headers. These will be replaced by calls to either setHeader or addHeader, even though addHeader would usually append an additional value.
Functions
Link copied to clipboard
open fun addHeader(key: String, factory: LazyHeaderFactory): LazyHeaders.Builder
Content copied to clipboard
Adds an LazyHeaderFactory that will be used to construct a value for the given key lazily on a background thread.
Adds a value for the given header and returns this builder.
Link copied to clipboard
Returns a new immutable LazyHeaders object.
Link copied to clipboard
open fun setHeader(key: String, factory: LazyHeaderFactory): LazyHeaders.Builder
Content copied to clipboard
Replaces all existing LazyHeaderFactorys for the given key with the given LazyHeaderFactory.