Fountain.HTTP (fountain_sdk v0.1.0)

Copy Markdown View Source

Bearer-authenticated JSON HTTP with an injectable transport.

Summary

Types

t()

@type t() :: %Fountain.HTTP{
  config: Fountain.Config.t(),
  timeout: timeout(),
  transport: module()
}

Functions

base_url(http)

data(http, method, path, opts \\ [])

data!(http, method, path, opts \\ [])

decode_body(raw)

headers(http, extra \\ [])

list(http, path, opts \\ [])

list!(http, path, opts \\ [])

new(config, opts \\ [])

request(http, method, path, opts \\ [])

Sends an HTTP request and returns its decoded JSON (or text) body.

request!(http, method, path, opts \\ [])

url(http, path, query \\ [])

user_agent()