hapi icon indicating copy to clipboard operation
hapi copied to clipboard

How to Return Stream

Open davidkavanaugh opened this issue 4 years ago • 1 comments

Support plan

  • is this issue currently blocking your project? (yes/no): No
  • is this issue affecting a production system? (yes/no): No

Context

  • node version: 10.12.21
  • module version: 19.2.0
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): hapi application
  • any other relevant information:

How can we help?

What's the best way to return a stream with hapi? Please show me some documentation, if available.

return h.response(Buffer);

davidkavanaugh avatar Jan 23 '22 14:01 davidkavanaugh

return stream;

https://hapi.dev/api?v=20.2.0#lifecycle-methods

kanongil avatar Jan 23 '22 15:01 kanongil