HTTP client adapter behaviour.
Usage
defmodule MyHTTPAdapter do
@behaviour Premailex.HTTPAdapter
@impl true
def request(method, url, body, headers, opts) do
# Implement your HTTP request logic here using your preferred HTTP client library.
# Return {:ok, response} or {:error, reason}.
end
endConfigure Premailex to use a custom adapter:
config :premailex,
http_adapter: MyHTTPAdapter
Summary
Callbacks
Makes an HTTP request.
Functions
Returns a User-Agent header tuple for use in HTTP requests.