TaxJar.Requests.HTTPBehaviour behaviour (tax_jar v0.2.1)

Behaviour to define an HTTP adapter for the TaxJar API.

Summary

Callbacks

Perform an HTTP POST request to the given path with the given body.

Callbacks

Link to this callback

post(path, body, opts)

@callback post(
  path :: binary(),
  body :: map(),
  opts :: keyword()
) :: {:ok, map()} | {:error, TaxJar.Requests.Error.t()}

Perform an HTTP POST request to the given path with the given body.

The options should be utilized to the configured adapter so that one can specify additional configuration like timeouts, headers, etc.