Premailex v0.3.5 Premailex.HTTPoisonAdapter View Source
Adapter module for HTTPoison.
Link to this section Summary
Link to this section Functions
Fetches an URL and returns the body if the response has a 200 HTTP status code.
Examples
iex> Premailex.HTTPoisonAdapter.get("http://localhost:4000/styles.css")
{:ok, "body {color: #000;}"}
iex> Premailex.HTTPoisonAdapter.get("http://localhost:4000/nonexistant.css")
{:error, %HTTPoison.Response{status_code: 404}}