nestia
nestia copied to clipboard
Content type of response changes randomly to text/plain (instead of application/json)
Question
I use @TypedRoute.Get() in a controller to retrieve data. Usually I get as the expected content-type application/json but in random responses I get text/plain as content-type. If I use the default Nest.js decorator @Get() instead of @TypedRoute.Get(), the response always consistently has the expected content-type application/json. Is there an explanation for this behavior?
https://github.com/samchon/nestia/blob/master/packages/core/src/decorators/TypedRoute.ts#L126
Well, can you provide a reproducible repo?
As you can see the nestia
code, if text/plain
content type comes, it is a critical bug of basic NestJS library (interceptor).
https://github.com/samchon/nestia/blob/master/packages/core/src/decorators/TypedRoute.ts#L126
Well, can you provide a reproducible repo?
As you can see the
nestia
code, iftext/plain
content type comes, it is a critical bug of basic NestJS library (interceptor).
I encountered the same behavior with Caching. Here reproducible repo: itzRolf/nestia-textplain