Skip to content

How to access the body of an incoming request

Lloyd Brookes edited this page Jul 9, 2017 · 2 revisions

If you need to access the request body in middleware, include the module lws-body-parser from the default stack somewhere high up your personal stack.

Now, if an incoming request contains a body it will be present at ctx.request.body or ctx.request.rawBody. See koa-bodyparser for more information.

Clone this wiki locally