1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.ReverseProxy.Client do
6 @type status :: pos_integer()
7 @type header_name :: String.t()
8 @type header_value :: String.t()
9 @type headers :: [{header_name(), header_value()}]
11 @callback request(atom(), String.t(), headers(), String.t(), list()) ::
12 {:ok, status(), headers(), reference() | map()}
13 | {:ok, status(), headers()}
17 @callback stream_body(map()) :: {:ok, binary(), map()} | :done | {:error, atom() | String.t()}
19 @callback close(reference() | pid() | map()) :: :ok