Mojito.Headers.get

You're seeing just the function get, go back to Mojito.Headers module for more information.

Specs

get(headers(), String.t()) :: String.t() | nil

Returns the value for the given HTTP request or response header, or nil if not found.

Header names are matched case-insensitively.

If more than one matching header is found, the values are joined with "," as specified in RFC 2616.

Example:

iex> headers = [
...>   {"header1", "foo"},
...>   {"header2", "bar"},
...>   {"Header1", "baz"}
...> ]
iex> Mojito.Headers.get(headers, "header2")
"bar"
iex> Mojito.Headers.get(headers, "HEADER1")
"foo,baz"
iex> Mojito.Headers.get(headers, "header3")
nil