Companion

object Companion

Properties

Link copied to clipboard
val json: Json

A Json configured for Resend payloads, which ignores fields these models do not declare.

Functions

Link copied to clipboard

Decodes a Resend webhook request body with json, without verifying its signature.

Link copied to clipboard
fun verifyAndDecode(rawBody: String, headers: Headers, secret: String): ResendWebhookMsg

Verifies a Resend webhook request's Svix signature, then decodes rawBody; the overload for Ktor's request Headers, for example verifyAndDecode(call.receiveText(), call.request.headers, secret).

fun verifyAndDecode(rawBody: String, headers: Map<String, String>, secret: String): ResendWebhookMsg

Verifies a Resend webhook request's Svix signature with the Resend SDK's Webhooks.verify, then decodes rawBody with decode.