View Source Vault.HTTP.Adapter behaviour (libvault v0.2.4)

Adapter interface for making Vault HTTP.

Vault comes with a basic Tesla Adapter, providing support for hackney, httpc, and ibrowse

Link to this section Summary

Link to this section Types

@type headers() :: [{String.t(), String.t()}]
@type http_options() :: Keyword.t()
@type method() :: :get | :put | :post | :patch | :delete | :head
@type params() :: map()
@type response() :: %{headers: list(), status: integer(), body: String.t()}
@type url() :: String.t()

Link to this section Callbacks

Link to this callback

request(method, url, params, headers, http_options)

View Source
@callback request(method(), url(), params(), headers(), http_options()) ::
  {:ok, response()} | {:error, term()}