Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP subscription response schema #245

Closed
mthenw opened this issue Aug 8, 2017 · 2 comments
Closed

HTTP subscription response schema #245

mthenw opened this issue Aug 8, 2017 · 2 comments
Milestone

Comments

@mthenw
Copy link
Contributor

mthenw commented Aug 8, 2017

To respond to an HTTP event a function needs to return object with following fields:

  • statusCode - int - response status code, default: 200
  • headers - object - response headers
  • body - string - response body
@mthenw
Copy link
Contributor Author

mthenw commented Aug 15, 2017

I had to revert that change. I thought that we can do that without conflicting with async functions but we cannot.

Basically, if the subscription is http we MUST require special response object, it cannot be optional. Trying to figure out if user returned HTTP response object or just some random object is impossible and creates confussion. BTW, this is how API Gateway works right now.

So once HTTP subscription is created backing function need to implement that structure, if not error from EG should be returned.

@brianneisler
Copy link
Contributor

Makes sense to me that we would require the response structure for http subscriptions.

@mthenw mthenw added this to the 0.6.0 milestone Aug 24, 2017
@mthenw mthenw closed this as completed in 3572a3c Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants