1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.WebPushHttpClientMock do
6 def get(url, headers \\ [], options \\ []) do
9 %Tesla.Env{status: status}
10 } = Pleroma.HTTP.request(:get, url, "", headers, options)
12 {res, %{status_code: status}}
15 def post(url, body, headers \\ [], options \\ []) do
18 %Tesla.Env{status: status}
19 } = Pleroma.HTTP.request(:post, url, body, headers, options)
21 {res, %{status_code: status}}