Merge branch 'correct-and-improve-http-options' into 'develop'
Correct and improve http options See merge request pleroma/pleroma!505
This commit is contained in:
commit
abead01ab6
8 changed files with 20 additions and 27 deletions
|
|
@ -1216,7 +1216,14 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController 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,
|
||||
[],
|
||||
adapter: [
|
||||
timeout: timeout,
|
||||
recv_timeout: timeout
|
||||
]
|
||||
),
|
||||
{:ok, data} <- Jason.decode(body) do
|
||||
data2 =
|
||||
Enum.slice(data, 0, limit)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue