Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Webhooks assume you use express #8

Open
doc-l opened this issue Nov 12, 2020 · 3 comments
Open

Webhooks assume you use express #8

doc-l opened this issue Nov 12, 2020 · 3 comments

Comments

@doc-l
Copy link

doc-l commented Nov 12, 2020

If you don't use express, it's nearly impossible to use webhooks, because the webhook functionality assumes express responses:

resp.status(200).send({

A better function signature would be to have a function that has as input the body and headers of some request, and as output what should be sent as a result.

@radicaled
Copy link

This is an issue for us as well.

@chaseeb
Copy link

chaseeb commented Jan 19, 2021

Was this resolved?

@doc-l
Copy link
Author

doc-l commented Jan 20, 2021

No, if you don't use express it's extremely difficult to get the webhooks working. I got it working by reverse engineering the express code and writing/copy/pasting parts of it myself, omitting some crucial features to get it working.

Ideally the webhooks don't assume express or any framework, just return some promises that you can deal with yourself and provide an express example.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants