Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
623B

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