Instream.Query.Headers

Header Utility.

Source

Summary

assemble(conn)

Assembles the headers for a query

assemble_auth(auth)

Assembles headers for basic authentication

Functions

assemble(conn)

Specs:

Assembles the headers for a query.

Source
assemble_auth(auth)

Specs:

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'}]
Source