Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Notify
r? @stripe/api-library-reviewers
Summary
Adds an example that uses koa.js to our
examples/
folder.I originally thought this would be trivial. The result looked simple but I unfortunately struggled for hours trying to get a handle on the raw bodyusing standard-ish koa node modules. The
koa-bodyparser
README contains pretty clear instructions, but I did not find those at first, because I tried to copy and paste the express example and just modify it for Koa. In our express example, we skip the body-parsing middleware in the case of webhooks, which is not the right approach for Koa, or at least I couldn't figure out how to access the raw body that way.Motivation
Fixes #1435.