classafButter::StickyHeadersMiddleware

sys::Obj
  afButter::StickyHeadersMiddleware : afButter::ButterMiddleware

(Middleware) - Automatically sets headers in each request, so you don't have to!

Only non-existing header values are set, leaving any existing values untouched. This means you can use sticky headers to set default values and manually override them for individual requests.

get

Source

@Operator
Str? get(Str key)

Getter for sticky header values.

headers

Source

HttpRequestHeaders headers := HttpRequestHeaders.<ctor>()

The header values set in every request

set

Source

@Operator
Void set(Str key, Str? val)

Setter for sticky header values. Setting a null value removes the value from the map.