max-mapper / websocket-stream

websockets with the node stream API
BSD 2-Clause "Simplified" License
667 stars 114 forks source link

If options is supplied and has a headers property, make sure to pass through the custom headers. #145

Open rrrhys opened 5 years ago

rrrhys commented 5 years ago

Fixes issue in React Native, detailed here: https://github.com/mqttjs/MQTT.js/issues/856 and here: https://github.com/aws/aws-iot-device-sdk-js/issues/169

If custom headers are passed in to websocket-stream, they should be used when creating the websocket.

mcollina commented 5 years ago

Can you add a unit test for this?