Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Created August 3, 2018 22:37
Show Gist options
  • Save KamilLelonek/87bde5989a3c1189e0bb37752dc260bf to your computer and use it in GitHub Desktop.
Save KamilLelonek/87bde5989a3c1189e0bb37752dc260bf to your computer and use it in GitHub Desktop.
defmodule Http.Behaviour do
@typep url :: binary()
@typep body :: {:form, [{atom(), any()}]}
@typep headers :: [{atom, binary}] | [{binary, binary}] | %{binary => binary}
@typep options :: Keyword.t()
@callback post(url, body, headers, options) :: {:ok, map()} | {:error, binary() | map()}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment