Get raw request body in custom controller

@adrinr’s answer is right. Just wanted to add, that when retrieving the raw body, you don’t necessarily have to import the symbol from koa dependency. This will do as well:

const raw = ctx.request.body[Symbol.for("unparsedBody")];
5 Likes