If I try:
url = "https://www.economist.com/news/finance-and-economics/21727073-economists-struggle-work-out-how-much-free-economy-comes-cost"
{:ok, %HTTPoison.Response{status_code: 200, body: body}} = HTTPoison.get(url)
IO.binwrite body
I see garbled text (instead of html) in the console. But if I view source on the webpage, I see html there. What am I doing wrong?
PS: it works fine with a js http client (axios.js), not sure why it doesn't work with httpoison