-
-
Couldn't load subscription status.
- Fork 857
Description
Currently only application/json is supported and assumed in form parts (i.e. "part is parsed as JSON" in the docs).
Being able to support other types, like media or any kind of data type would be great for generic webhooks which send such data (like Matrix-hookshot in my case).
If a non-json content-type is encountered, the data should be saved to a temp/work dir according to their file_name parameter or name parameter if file_name isn't present. The path then can exposed to the webhook handler in the same fashion as other parameters (like env var containing the path or even the raw data).
Similar functionality exists already except that the binary data must first be converted to a json. This means that a webhook containing binary data must either be preprocessed somehow (which effectively means creating another webhook handling service in front of Webhook) or the webhook dispatcher must be configured to do that kind of conversion, which isn't always possible.