logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

request.ex (673B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.HTTP.Request do
  5. @moduledoc """
  6. Request struct.
  7. """
  8. defstruct method: :get, url: "", query: [], headers: [], body: "", opts: []
  9. @type method :: :head | :get | :delete | :trace | :options | :post | :put | :patch
  10. @type url :: String.t()
  11. @type headers :: [{String.t(), String.t()}]
  12. @type t :: %__MODULE__{
  13. method: method(),
  14. url: url(),
  15. query: keyword(),
  16. headers: headers(),
  17. body: String.t(),
  18. opts: keyword()
  19. }
  20. end