You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x ] used the search to make sure that a similar issue hasn't already been submit
Expected Behavior
Allow when we return from a controller method a null value and the response is json then the null should appear as a body
If the data is a string but the content type is not specified then return the text as is without using json (e.g. quoted string)
Current Behavior
When the result is null with any content type then the response won't have any data
If we return a string without specifying the content type as JSON then the result will be the quoted string
Possible Solution
In expressTemplateService.ts fix the returnHandler to not assume that the response should be always a JSON response,
the same as in the koa and hapi implementations
then make sure that the response body is the text - Some String and not - "Some String"
Context (Environment)
Version of the library: 6.6.0
Version of NodeJS: v18.19.0
Confirm you were using yarn not npm: [x ]
Detailed Description
Breaking change?
The text was updated successfully, but these errors were encountered:
kchobantonov
changed the title
property support JSON types when the response is JSON and return raw data when the response is not JSON
properly support JSON types when the response is JSON and return raw data when the response is not JSON
Jan 5, 2025
Sorting
I'm submitting a ...
I confirm that I
Expected Behavior
Current Behavior
Possible Solution
In expressTemplateService.ts fix the returnHandler to not assume that the response should be always a JSON response,
the same as in the koa and hapi implementations
Steps to Reproduce
then make sure that the response body is the text - null
Have the following controller method
Context (Environment)
Version of the library: 6.6.0
Version of NodeJS: v18.19.0
Detailed Description
Breaking change?
The text was updated successfully, but these errors were encountered: