CalCom.Request (cal_com v0.3.0)

Copy Markdown

A description of one HTTP request the caller makes on the package's behalf.

The package never opens a socket — it returns this struct and the caller sends it with whatever client they already use. private carries the parsed call and its credentials so CalCom.Pagination can build the next page without re-parsing the caller's input; it is never sent on the wire.

Summary

Types

An HTTP header pair as sent on the wire.

t()

A pure request description; private never leaves the process.

Functions

The request with entries merged into its private state.

Types

header()

@type header() :: {String.t(), String.t()}

An HTTP header pair as sent on the wire.

t()

@type t() :: %CalCom.Request{
  body: iodata() | nil,
  headers: [header()],
  method: :get | :post | :put | :patch | :delete,
  private: map(),
  url: String.t()
}

A pure request description; private never leaves the process.

Functions

put_private(request, entries)

@spec put_private(t(), keyword() | map()) :: t()

The request with entries merged into its private state.

Examples

iex> request = %CalCom.Request{url: "https://example.test"}
iex> CalCom.Request.put_private(request, queue: ["a", "b"]).private
%{queue: ["a", "b"]}