Koa Body Parser
Koa-Middleware for parsing body parameters in the request. Lightweight and no dependencies.
Supported encodings:
- form-data
- x-www-form-urlencoded
- json
Complete Example
const Koa = parser = router = const app = port = 3000 app app app
Documentation
body
Element
~ The Parser defines an object ctx.request.body
where all the sent parameters are stored
Example
// Request: HTTP POST /ctxrequestbody'username' "joe"