Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace/extend default HTTP headers with custom ones #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Endebert
Copy link

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 #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

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
@soyuka
Copy link

soyuka commented Sep 13, 2019

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

@Endebert
Copy link
Author

@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.

@soyuka
Copy link

soyuka commented Sep 13, 2019

@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
#2

@Endebert
Copy link
Author

@soyuka Thanks for all the info :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants