Maxwell.Middleware.HeaderCase (maxwell v2.4.0) View Source

Forces all request headers to be of a certain case.

Examples

# Lower
iex> conn = %Maxwell.Conn{req_headers: %{"content-type" => "application/json}}
...> Maxwell.Middleware.HeaderCase.request(conn, :lower)
%Maxwell.Conn{req_headers: %{"content-type" => "application/json}}

# Upper
iex> conn = %Maxwell.Conn{req_headers: %{"content-type" => "application/json}}
...> Maxwell.Middleware.HeaderCase.request(conn, :upper)
%Maxwell.Conn{req_headers: %{"CONTENT-TYPE" => "application/json}}

# Title
iex> conn = %Maxwell.Conn{req_headers: %{"content-type" => "application/json}}
...> Maxwell.Middleware.HeaderCase.request(conn, :title)
%Maxwell.Conn{req_headers: %{"Content-Type" => "application/json}}

Link to this section Summary

Link to this section Functions