Skip to content

How to return a response as string? #823

Answered by RobinTail
McMerph asked this question in Q&A
Discussion options

You must be logged in to vote

Is it expected?

Yes. On the level of middlewares and endpoints you can only operate objects.
However, the final response is the duty of ResultHandler.

You need a custom ResultHandler.
Check out the documentation and file download/streaming example in this repo.
It exactly responds with a string, @McMerph

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RobinTail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants