chaperon v0.2.3 Chaperon.Action.HTTP View Source

HTTP based actions to be run in a Chaperon.Scenario module for a given Chaperon.Session.

This supports GET, POST, PUT, PATCH, DELETE & HEAD requests with support for optional headers & query params.

Link to this section Summary

Link to this section Types

Link to this type method() View Source
method() :: :get | :post | :put | :patch | :delete | :head
Link to this type options() View Source
options() :: [
  form: map() | Keyword.t(),
  json: map() | Keyword.t(),
  headers: map() | Keyword.t(),
  params: map() | Keyword.t(),
  decode: :json | (HTTPoison.Response.t() -> any()),
  with_result: Chaperon.Session.result_callback(),
  metrics_url: String.t()
]
Link to this type t() View Source
t() :: %Chaperon.Action.HTTP{
  body: binary(),
  callback: Chaperon.Session.result_callback(),
  decode: :json | (HTTPoison.Response.t() -> any()),
  headers: map(),
  method: method(),
  metrics_url: String.t(),
  params: map(),
  path: String.t()
}

Link to this section Functions

Link to this function add_options(action, opts) View Source
add_options(any(), Chaperon.Action.HTTP.options()) :: t()
Link to this function delete(path, opts \\ []) View Source
delete(String.t(), options()) :: t()
Link to this function full_url(action, session) View Source
Link to this function metrics_url(action, session) View Source
Link to this function options(action, session) View Source
Link to this function patch(path, opts) View Source
patch(String.t(), options()) :: t()
Link to this function post(path, opts) View Source
post(String.t(), options()) :: t()
Link to this function query_params_string(params) View Source