HTTPoison body decode

Hello guys, so I’m experiencing something that has never happened to me before. Every time I check a HTTP.Response, I have to decode the body cause it is a string/json. Just like in the following gist:

case result do
      {:ok, %HTTPoison.Response{body: body, status_code: 200}} ->
        |> Jason.decode!()
        |> format_events(index_name, {shows, episodes})

The problem is, a fellow coworker has to delete the decode!/1 because his response (body) is already decoded… he’s working on a linux based system (Ubuntu), and I’m working on MacOS. Can that detail be remotely related?

The OS shouldn’t be a factor in something like this. The first check I would do is for each of you to run:

rm -rf _build deps
mix deps.get
mix compile
mix test

My best guess (without looking at HTTPoison’s docs) is it’s possible that something in your project is reading a configuration at compile-time and isn’t getting recompiled.

I assume the response always comes from the same server? If not maybe the content type header isn’t set properly?