When I run this:
HTTPoison.get! "www.example.com"
I get an %HTTPoison.Response
struct which contains the body, headers and the status code. Normally the body should contain the actual response, but I almost always get an empty body, everything else in the response works fine. Here is what it looks like:
%HTTPoison.Response{
body: "",
headers: [
{"Location",
"http://megaplusredirection.tedata.net/VDSL-Redirection_90.html"},
{"Connection", "close"}
],
request: %HTTPoison.Request{
body: "",
headers: [],
method: :get,
options: [],
params: %{},
url: "http://www.example.com"
},
request_url: "http://www.example.com",
status_code: 307
Notice how the body is an empty string.
Is this how HTTPoison is supposed to work or am I doing something wrong ?
Thanks in advance guys