journey
journey copied to clipboard
Handle Buffers being passed back (even though journey is intended to be JSON only)
If a buffer is returned from a route, currently Journey will error on the line, as byteLength is expecting a string.
Buffer.byteLength(outcome.body);
Seeing as converting a Buffer to JSON is not a huge amount of use, my patch returns the buffer, and retains the Content-Type as is.
I know journey is supposed to be JSON-only, but the code change to support binary files is minimal and low impact.