Low-level HTTP transport for CalDAV requests.
Wraps Req to issue GET, PUT, DELETE, and the WebDAV/CalDAV
extension methods (PROPFIND, PROPPATCH, MKCALENDAR, REPORT),
injects standard headers (User-Agent, Content-Type, Accept) and
the Authorization header produced by CalDAVEx.Auth, applies the
client's configured timeout_ms, and normalizes results into either
{:ok, %{status, body, headers}} or {:error, %CalDAVEx.Error{}}.
Summary
Functions
Issues a single HTTP request against a CalDAV server.
Types
HTTP / WebDAV / CalDAV method.
The convenience atoms :propfind, :proppatch, :mkcalendar, and
:report are translated to their uppercase string equivalents before
being passed to Req. Standard HTTP method atoms (:get, :put,
:delete, ...) and raw string methods (e.g. "PATCH") are passed
through verbatim.
@type response() :: %{ status: non_neg_integer(), body: term(), headers: %{optional(binary()) => [binary()]} }
Successful response payload.
Functions
@spec request( CalDAVEx.Client.t(), method(), String.t(), [{String.t(), String.t()}], iodata() | nil ) :: {:ok, response()} | {:error, CalDAVEx.Error.t()}
Issues a single HTTP request against a CalDAV server.
Parameters
client- a%CalDAVEx.Client{}method- one of:get,:put,:delete,:propfind,:proppatch,:mkcalendar,:report, or any value accepted byRequrl- the absolute request URLheaders- additional request headers as{name, value}tuplesbody- request body, ornilfor methods that have no body
Returns
{:ok, %{status: non_neg_integer, body: term, headers: map}}for 2xx responses{:error, %CalDAVEx.Error{type: :http}}for non-2xx responses{:error, %CalDAVEx.Error{type: :transport}}for connection/transport failures