Mojito.get
You're seeing just the function
get
, go back to Mojito module for more information.
Specs
Performs an HTTP GET request and returns the response.
Examples
Assemble a URL with a query string params and fetch it with GET request:
>>>> "https://www.google.com/search"
...> |> URI.parse()
...> |> Map.put(:query, URI.encode_query(%{"q" => "mojito elixir"}))
...> |> URI.to_string()
...> |> Mojito.get()
{:ok,
%Mojito.Response{
body: "<!doctype html><html lang=\"en\"><head><meta charset=\"UTF-8\"> ...",
complete: true,
headers: [
{"content-type", "text/html; charset=ISO-8859-1"},
...
],
status_code: 200
}}
See request/1
for detailed documentation.