Instream v0.18.0 Instream.Query.Headers View Source
Header Utility.
Link to this section Summary
Functions
Assembles the headers for a query
Assembles headers for basic authentication
Assembles headers for response encoding
Link to this section Functions
Assembles the headers for a query.
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"}]