Closed deviantdes closed 4 years ago
I'm with the same issue, but except that is for one route only. All other is ok.
The router needs to return something (for example an empty array).
You need to set your ctx.body to something.
@jonathangaldino @Pryrios i think you all should head over here for better maintained project https://github.com/koajs/router . also it's officially by koa
thanks @Pryrios , problem was solved after setting ctx.status = 200.
Will be closing this issue
Have been looking around but could not find any solution regarding router.post. I am not able to get any response from all the post handlers, the responses from the contexts are 404 and does not contain any body.
Here is my html to submit a test post request
Here is my router file (routerclass.route.js)
the app.js
And the print out of the ctx
The post API is able to hit, but the ctx that is printed shows the returned response is 404, and there is no body included.
Feels like im missing an await or usage of another koa library somewhere
any help is appreciated.