Koa: Access to HTTP request body

Created on 12 Jan 2014  路  4Comments  路  Source: koajs/koa

Currently how do you access HTTP POST request body in Koa? First I noticed that body parser module repo has been deleted. It's still still available through npm, but should it be used? Will it have future?

I then tried to figure out how to extract the raw body but that wasn't obvious either. Maybe clarify the situation somewhere.

All 4 comments

Use co-body.

@ilkkao, there are examples in the koajs/examples repo.

If people are doing like me, they go the the Lego box in https://github.com/koajs/koa/wiki#middleware and try to assemble their app =)
It would be really nice to have it there :smile:

update rather, this: https://npmjs.org/package/koa-body-parser -- not sure
https://npmjs.org/package/koa-formidable ?

yeah it's kind of weird. most of these things are designed to work without koa and thus are in co's wiki. we should add it though: https://github.com/visionmedia/co/wiki#wiki-http-servers

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SteveCruise picture SteveCruise  路  5Comments

ke1Del picture ke1Del  路  3Comments

xinshouke picture xinshouke  路  4Comments

koalex picture koalex  路  3Comments

tvq picture tvq  路  4Comments