Instream.Query.Headers
Header Utility.
Summary
assemble(conn) | Assembles the headers for a query |
assemble_auth(auth) | Assembles headers for basic authentication |
Functions
Specs:
- assemble(conn :: Keyword.t) :: list
Assembles the headers for a query.
Specs:
- assemble_auth(auth :: Keyword.t) :: list
Assembles headers for basic authentication.
Will return an empty list if query authentication is configured. Will return an empty list if either username of password is missing.
Usage
iex> assemble_auth([ method: :query ])
[]
iex> assemble_auth([ username: "user" ])
[]
iex> assemble_auth([ password: "pass" ])
[]
iex> assemble_auth([ username: "user", password: "pass" ])
[{'Authorization', 'Basic dXNlcjpwYXNz'}]