Premailex v0.3.7 Premailex.HTTPoisonAdapter View Source
Adapter module for HTTPoison.
Link to this section Summary
Link to this section Functions
Link to this function
get(url) View Source
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}}