Skip to content

Expose response headers which are currently set. #3421

@JvJefke

Description

@JvJefke

I have a use case where I need a list of all currently set headers. This is possible with the unofficial res._headers property. It would be great if there would be an official way to get this information.

Maybe the response object could be extended with this:
res.getHeaders();

This would then return a copy of the currently set headers.

Does this seem like a good idea?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions