Downstream (Downstream v1.1.0) View Source
Downstream is an Elixir client for streaming downloads via GET or POST requests,
by relying on HTTPoison.
Downstream is simple to use, just pass it a URL and an IO device:
Link to this section Summary
Functions
Downloads from a given URL with a GET request.
Downloads from the given URL with a GET request, raising an exception in the case of failure.
Downloads from a given URL with a POST request.
Downloads from the given URL with a POST request, raising an exception in the case of failure.
Link to this section Functions
Specs
get(binary(), IO.device(), Keyword.t()) :: {:ok, Downstream.Response.t()} | {:error, Downstream.Error.t()}
Downloads from a given URL with a GET request.
Returns {:ok, %Downstream.Response{}} if the download is successful, and
{:error, %Downstream.Error{}} otherwise.
Specs
get!(binary(), IO.device(), Keyword.t()) :: Downstream.Response.t() | Downstream.Error.t()
Downloads from the given URL with a GET request, raising an exception in the case of failure.
If the request succeeds, a Downstream.Response struct is returned.
Specs
post(binary(), IO.device(), binary() | {atom(), any()}, Keyword.t()) :: {:ok, Downstream.Response.t()} | {:error, Downstream.Error.t()}
Downloads from a given URL with a POST request.
Returns {:ok, %Downstream.Response{}} if the download is successful, and
{:error, %Downstream.Error{}} otherwise.
Specs
post!(binary(), IO.device(), binary() | {atom(), any()}, Keyword.t()) :: Downstream.Response.t() | Downstream.Error.t()
Downloads from the given URL with a POST request, raising an exception in the case of failure.
If the request succeeds, a Downstream.Response struct is returned.