RssWatcher v0.1.1 RssWatcher.HTTP.Tesla View Source

Tesla adapter for HTTP fetching. Used by default if no configuration is provided.

Installation

To use, add the following to your dependancies.

    {:tesla, "~> 1.2.1"}

You may need to add additional dependencies based on your HTTP adapter of choice. (hackney, etc)

Link to this section Summary

Link to this section Functions

Link to this function

get_feed(url, options \\ []) View Source (since 0.1.0)
get_feed(String.t(), Keyword.t()) ::
  {:ok, String.t()}
  | {:error, {:http_client_error, term()}}
  | {:error, {:not_xml, String.t()}}
  | {:error, {:unsuccessful_request, term()}}

Fetch HTTP data using Tesla

Additional middleware and adapter configuration can be provided through the http_client_options key in the RssWatcher.Subscription config.

Options

  • :adapter - The tesla HTTP adpater to use. Defaults to :httpc. Can be a module or a tuple of a {module, options}
  • :middleware - The tesla middleware to use.