{:ok, %{body: body, status: code}} when code in 200..299 <-
@httpoison.get(
url,
- [Accept: "application/atom+xml"],
- follow_redirect: true
+ [{:Accept, "application/atom+xml"}]
) do
Logger.debug("Got document from #{url}, handling...")
handle_incoming(body)
Logger.debug("Trying to fetch #{url}")
with true <- String.starts_with?(url, "http"),
- {:ok, %{body: body}} <- @httpoison.get(url, [], follow_redirect: true),
+ {:ok, %{body: body}} <- @httpoison.get(url, []),
{:ok, atom_url} <- get_atom_url(body) do
fetch_activity_from_atom_url(atom_url)
else