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

Feature Request: get current response headers or unset them alll #4770

Closed
jonathanong opened this issue Jan 19, 2016 · 1 comment
Closed
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. feature request Issues that request new features to be added to Node.js. http Issues or PRs related to the http subsystem.

Comments

@jonathanong
Copy link
Contributor

https://github.com/koajs/koa/blob/fcacb352208115e60fffe145394f904743dfa8c3/lib/context.js#L121 so we don't have to do hacks like this.

Would like at least one of the following:

// get all header keys
res.getHeaderKeys() // => ['content-type', 'content-length']

// unset all headers
res.unsetHeaders()

I think (from reading issues a while ago) that all the headers are stored in node as [ [<key>, <value>] ] pairs. i don't mind making that public, either.

@jonathanong
Copy link
Contributor Author

oh sorry, didn't read #1873 thoroughly enough

@ChALkeR ChALkeR added duplicate Issues and PRs that are duplicates of other issues or PRs. feature request Issues that request new features to be added to Node.js. http Issues or PRs related to the http subsystem. labels Jan 19, 2016
This was referenced Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. feature request Issues that request new features to be added to Node.js. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

No branches or pull requests

2 participants