I am trying to create an endpoint where the response body is just a string with line breaks, but the response keeps showing the \n character.
My endpoint code:
get '' do
header('Content-Type', 'text/plain')
body("Hello\nWorld")
end
And this is the response I see in Postman:
What am I missing here?
Thank you
CodePudding user response: