01045f8c9fcbd7bff6ec1a2c38201737faf72499
[anni] / lib / pleroma / http / request.ex
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
5 defmodule Pleroma.HTTP.Request do
6   @moduledoc """
7   Request struct.
8   """
9   defstruct method: :get, url: "", query: [], headers: [], body: "", opts: []
10
11   @type method :: :head | :get | :delete | :trace | :options | :post | :put | :patch
12   @type url :: String.t()
13   @type headers :: [{String.t(), String.t()}]
14
15   @type t :: %__MODULE__{
16           method: method(),
17           url: url(),
18           query: keyword(),
19           headers: headers(),
20           body: String.t(),
21           opts: keyword()
22         }
23 end