koajs / bodyparser

Koa body parsing middleware
MIT License
1.3k stars 116 forks source link

Every example *and* test is reassigning request body to response body #147

Closed SampsonCrowley closed 1 year ago

SampsonCrowley commented 2 years ago

Why is this the default example in every case to just blindly reassign the body back to body and send it back instead of having even one single example of how to use the params within the parsed request body? (I assume it's an object or array)

I'm honestly confusued on this design decision outside of testing. Testing makes sense up to a point. is this module not even a request parser? is it a response formatter??

3imed-jaberi commented 1 year ago

@SampsonCrowley, through the example we try to ensure/show the body parsing. If you want an additional example, feel free to open a PR or put your request in detail.