Informations
What is the current behavior?
Fetching the request params as ctx.request.body will return an Object (as far as I investigated, a Koa related one) that cannot be parsed like const { id } = body.posting_id
or const { id } = body['posting_id']
Steps to reproduce the problem
Make a custom POST endpoint, pass some parameters.
What is the expected behavior?
The body should be parsed
Suggested solutions
Where your body
come from ?
Not sure to understand your issue.
ctx.request.body
to get your params.
ctx.params
to get url params
ctx.query
to get url queries
Most helpful comment
Where your
body
come from ?Not sure to understand your issue.
ctx.request.body
to get your params.ctx.params
to get url paramsctx.query
to get url queries