How do I pass plain text as my request body using NestJS?
问题 One of the controller methods in my NestJS application is supposed to take plain text as its body but whenever I try to make a request, the parameter is received as an empty object. Is this even possible or am I going to have to create some sort of DTO to pass that single string? Example: @Post() myFunction(@Body() id: string) { // do something here } 回答1: I see that this question is pretty old, but it is listed in google among first, so I want to add answer here. If you don't want to add