node-ssestream icon indicating copy to clipboard operation
node-ssestream copied to clipboard

feat: replace/extend default HTTP headers with custom ones

Open Endebert opened this issue 7 years ago • 4 comments

Added a new (optional) argument to the pipe() function that adds the ability to replace the default HTTP headers for the request, or add custom ones.

Includes additional test and updated README.md.

This covers the use-case for https://github.com/EventSource/node-ssestream/pull/1. However, my PR adds this functionality using a new argument, i.e. it's not a breaking change.

In the meantime, my modified version is published as "@tillhub/node-ssestream": https://www.npmjs.com/package/@tillhub/node-ssestream

Endebert avatar Nov 26 '18 11:11 Endebert

this should be added via the constructor, see my fork at https://github.com/soyuka/ssestream

soyuka avatar Sep 13 '19 13:09 soyuka

@soyuka Thanks for the info. Could you please try your luck & create a PR with your changes? Maybe you have more luck than us, though I don't have high hopes.

Endebert avatar Sep 13 '19 13:09 Endebert

@Endebert if this project is maintained the maintainers will definitely have a look, if not you should use something that is maintained :). Also you have maf's alternative that is also widely used since longer: https://github.com/mafintosh/event-source-stream/.

In my fork I took the liberty of merging a few resouces that I found over the web: https://github.com/EventSource/node-ssestream/blob/master/README.md https://gist.github.com/gitawego/8ef33ec7d895498f2eedd95eafa835bb https://github.com/EventSource/node-ssestream/pull/2

soyuka avatar Sep 13 '19 14:09 soyuka

@soyuka Thanks for all the info :)

Endebert avatar Sep 13 '19 15:09 Endebert