diff options
author | William Pitcock <nenolod@dereferenced.org> | 2019-05-25 04:24:21 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2019-05-25 04:24:21 +0000 |
commit | 9bec891eb4d5d06e6bd84dd2c95259d2c1a4f563 (patch) | |
tree | 30812644e54583532e71dd69bd1d5eb2478713a9 /lib/pleroma/web/web_finger | |
parent | 9f44fa068648929aff639ecd5fd74e9c643803b5 (diff) | |
download | pleroma-9bec891eb4d5d06e6bd84dd2c95259d2c1a4f563.tar.gz |
kill @httpoison
Diffstat (limited to 'lib/pleroma/web/web_finger')
-rw-r--r-- | lib/pleroma/web/web_finger/web_finger.ex | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/pleroma/web/web_finger/web_finger.ex b/lib/pleroma/web/web_finger/web_finger.ex index c5b7d4acb..3fca72de8 100644 --- a/lib/pleroma/web/web_finger/web_finger.ex +++ b/lib/pleroma/web/web_finger/web_finger.ex @@ -3,8 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.WebFinger do - @httpoison Application.get_env(:pleroma, :httpoison) - + alias Pleroma.HTTP alias Pleroma.User alias Pleroma.Web alias Pleroma.Web.Federator.Publisher @@ -176,11 +175,11 @@ defmodule Pleroma.Web.WebFinger do def find_lrdd_template(domain) do with {:ok, %{status: status, body: body}} when status in 200..299 <- - @httpoison.get("http://#{domain}/.well-known/host-meta", []) do + HTTP.get("http://#{domain}/.well-known/host-meta", []) do get_template_from_xml(body) else _ -> - with {:ok, %{body: body}} <- @httpoison.get("https://#{domain}/.well-known/host-meta", []) do + with {:ok, %{body: body}} <- HTTP.get("https://#{domain}/.well-known/host-meta", []) do get_template_from_xml(body) else e -> {:error, "Can't find LRDD template: #{inspect(e)}"} @@ -209,7 +208,7 @@ defmodule Pleroma.Web.WebFinger do end with response <- - @httpoison.get( + HTTP.get( address, Accept: "application/xrd+xml,application/jrd+json" ), |