Am new to Elixir ,so am trying to create a function that uses HTTPoison to fetch the link .
The expected output when I call the function is suppose to appear this way:
%HTTPoison.Response{
body: "<!doctype html>...",
headers: [
{"Content-Type", "text/html"},..],
request: %HTTPoison.Request{
body: "",
headers: [],
method: :get,
options: [],
params: %{},
url: "https://medium.."
This is how my code looks like:
def fetch_blog() do
HTTPoison.get!("https://medium.com"
)
t()::%HTTPoison.Response{
body:term(),
headers:list(),
request:HTTPoison.Request.t(),
request_url:HTTpoison.Request.url(),
status_code:integer()
}
end
Where could I have got it wrong please!