Non-JSON endpoints in a predominantly JSON environment #1216
-
|
I have a use case where the majority of my routes return JSON formatted data, so I've set up the Express adapter with Now I need to implement a few new routes which need to return plain text. Other than using the injected response object (native types), is there any way to do this while using a HttpResponse as the return value? (In fact I'm trying to return either a 200 OK, or a 400 with a text body - currently using BadRequestHttpResponse but that gets serialised as JSON) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hey @egmacke,
Non native types have some limitations. You can return a 200 Returning a |
Beta Was this translation helpful? Give feedback.
Hey @egmacke,
I see, then it makes total sense to request that.
I see, it makes sense…