pjh
March 15, 2018, 10:07am
1
When I try to return plain text from the reply callback, it doesn't seem to work - it just hangs. Does anybody have any ideas as to why?
export default function (server) {
server.route({
path: '/metrics',
method: 'GET',
handler(req, reply) {
return 'ok'
}
});
}
When I return reply("text") it returns "text" surrounded in html tags
pjh
March 15, 2018, 3:39pm
2
so after a bit of playing about, it helps to have both type and encoding chained to the function
reply(thing).type('text/plain').encoding('binary')
Hope that hopes anyone looking for the same solution.
system
(system)
Closed
April 12, 2018, 3:40pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.