Hello OpenFn team. I’d like to suggest that Lightning webhooks support compressed request bodies. I view this working the “standard” way:
- Sender compresses a JSON payload body (e.g. with gzip)
- Sender triggers the webhook via HTTP POST with headers:
Content-Type: application/json
(orContent-Type: application/json; charset=utf-8
) andContent-Encoding: gzip
, plus the compressed body. - Webhook receives the POST, decompresses the body according to the
Content-Encoding
header, does whatever it needs behind-the-scenes (e.g., generate and persist state to the inbox), and replies to the caller.
The response code should only be a 20x if content is successfully decompressed AND the decompressed content matches the Content-Type
header (i.e., JSON).
I’d suggest starting with support for gzip and strongly consider support for brotli.