How to return text from nextjs app router route?
Answered
Southern rough shrimp posted this in #help-forum
Southern rough shrimpOP
We can return json using Response.json() but how to return simple plain text? Response.text("something") does not exist.
3 Replies
Answer
@Anay-208 return new Response("any text")
Southern rough shrimpOP
lmao I tried without the new, I feel dumb sorry and thanks
@Southern rough shrimp lmao I tried without the new, I feel dumb sorry and thanks
mark my message as a solution