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

Default headers argument to stream.headers #15

Open
PaulKiddle opened this issue Jul 17, 2020 · 1 comment
Open

Default headers argument to stream.headers #15

PaulKiddle opened this issue Jul 17, 2020 · 1 comment

Comments

@PaulKiddle
Copy link

Thanks for this neat little library!
One of the example usages for this is req => form(req, req.headers) - it strikes me that this probably common use case could be terser if we assume that the stream's headers are on stream.headers if the second argument is absent.

@blakeembrey
Copy link
Member

I'd be fine accepting a PR. I don't use this package with node.js request streams so it's not helpful to me, I just made this generic enough that anyone using any node.js stream should be able to use it.

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

No branches or pull requests

2 participants