DripDrop.WebhookRequest (DripDrop v0.1.0)

Copy Markdown View Source

Normalizes provider webhook request access for signature verification.

Providers receive either a Plug connection or a simple map from tests and from the framework-neutral webhook plug. This helper keeps header, body, URL, and parameter lookup consistent without coupling provider modules to Plug.

Summary

Functions

Returns the raw request body used for signature verification.

Fetches a request header by case-insensitive name.

Fetches a request parameter or nested parameter path.

Returns merged request parameters from a Plug connection or request map.

Returns the absolute request URL when available.

Functions

body(arg1)

@spec body(term()) :: binary()

Returns the raw request body used for signature verification.

header(request, name)

@spec header(term(), binary()) :: binary() | nil

Fetches a request header by case-insensitive name.

param(request, key)

@spec param(term(), binary() | [binary()]) :: term()

Fetches a request parameter or nested parameter path.

params(conn)

@spec params(term()) :: map()

Returns merged request parameters from a Plug connection or request map.

url(conn)

@spec url(term()) :: binary() | nil

Returns the absolute request URL when available.