1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.HTTP.Tzdata do
8 @behaviour Tzdata.HTTPClient
13 def get(url, headers, options) do
14 options = Keyword.put_new(options, :pool, :default)
16 with {:ok, %Tesla.Env{} = env} <- HTTP.get(url, headers, options) do
17 {:ok, {env.status, env.headers, env.body}}
22 def head(url, headers, options) do
23 options = Keyword.put_new(options, :pool, :default)
25 with {:ok, %Tesla.Env{} = env} <- HTTP.head(url, headers, options) do
26 {:ok, {env.status, env.headers}}