verifyBytes method
Like verify, for a body given as the raw bytes of the request.
Implementation
WebhookEvent verifyBytes({
required List<int> body,
required Map<String, String> headers,
}) {
verifySignatureBytes(body: body, headers: headers);
final String text;
try {
text = utf8.decode(body);
} on FormatException catch (e) {
throw InvalidPayloadException('The body is not valid UTF-8.', cause: e);
}
return WebhookEvent.parse(text);
}