scratcher_httpoison v0.1.0 Scratcher.HTTPoison

It is a module for using HTTPoison in the interface of Scratcher.HttpClient.

Link to this section Summary

Functions

As described in Scratcher.HttpClient, you can use it equivalently to other HTTP Clients.

Link to this section Functions

Link to this function

request(method, url, body \\ "", headers \\ [], http_opts \\ [])

As described in Scratcher.HttpClient, you can use it equivalently to other HTTP Clients.

config :your_module, http_client: Scratcher.HTTPoison
defmodule YourModule do
  @http_client Application.fetch_env!(:your_module) |> Keyword.fetch!(:http_client)

  def request(method, url, body, headers, http_opts) do
    @http_client.request(method, url, body, headers, http_opts)
  end
end