urlpreview v0.0.3 Urlpreview.Request

Summary

Functions

Returns the body and real_url for the requested URL. This also converts elements from charlist to their string representation

Functions

get(url)

Returns the body and real_url for the requested URL. This also converts elements from charlist to their string representation.

Examples

iex> Urlpreview.Request.get("https://www.google.com")
%{body: "<!doctype html>...", url: "https://www.google.com"}

iex> Urlpreview.Request.get("https://www.mybadurl.com")
%{:error, "Status code 500 encountered."}