5 ms·
Wow, I was thinking about building something like that but this looks very good! Is there a way to map query parameters and / or http headers to input JSON? (a
by hdhzy 10y ago
Wow, I was thinking about building something like that but this looks very good!
Is there a way to map query parameters and / or http headers to input JSON? (a la API Gateway).
- alexellisuk 10y agoSo I'd like to know more about your usercases - it's something I want to add to the roadmap. Right now this is designed to be facing services making HTTP POSTs aka webhooks and to act as an event type bus for modern web.
- hdhzy 10y agoSometimes I've got a service that won't send plain JSON but rather some data in query parameters and some in http headers. So it's rather for integration with others. AWS API Gateway makes it possible to build the input JSON out of any of (body, headers, query params) just before the lambda function is invoked. Note that they are using Velocity templates so it doesn't really look good but if you need this data it gets the job done.
- alexellisuk 10y agoThat makes sense, do you have any examples? The input doesn't have to be JSON btw.
- Kiro 10y agoI'm wondering more what kind of apps you build where you don't have any exposed API. This seems to be the melody of serverless though but for me the most obvious use case is an API so I'm not really following.
- alexellisuk 10y agoOne use-case is for acting as an event sink or event bus for webhooks. So integrations with Github, AlertManager, Confluence, Minio - basically anything that generates a webhook could be sunk into this gateway and handled as needed.
- hdhzy 10y agoGithub webhooks also have data in headers. Some of it is security critical (X-Hub-Signature). See https://developer.github.com/webhooks/#delivery-headers https://developer.github.com/webhooks/#delivery-headers