Commit 505d8208 authored by Hakaba Hitoyo's avatar Hakaba Hitoyo
Browse files

Merge remote-tracking branch 'origin/debug-suggestions-api' into correct-and-improve-http-options

parents 48a03156 a418547b
......@@ -1182,7 +1182,15 @@ def suggestions(%{assigns: %{user: user}} = conn, _) do
url = String.replace(api, "{{host}}", host) |> String.replace("{{user}}", user)
with {:ok, %{status: 200, body: body}} <-
@httpoison.get(url, [], timeout: timeout, recv_timeout: timeout),
@httpoison.get(
url,
[],
follow_redirect: true,
adapter: [
timeout: timeout,
recv_timeout: timeout
]
),
{:ok, data} <- Jason.decode(body) do
data2 =
Enum.slice(data, 0, limit)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment