-
Notifications
You must be signed in to change notification settings - Fork 110
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
Response object does not have response.headers #71
Comments
Sorry. It looks like the response object does indeed have |
See browserify#71. The Node http module's response object has `response.headers`, not `response.getHeader()`. The *http-browserify* module provides both, but previously only documented `response.getHeader()`. This changes the documentation to document `response.headers` instead. The `response.getHeader()` function is left undocumented as technically it does not match the node http module implementation.
Sent a pull request to change the documentation - see #72. Closing this now, but you may want to remove |
See browserify#71. The Node http module's response object has `response.headers`, not `response.getHeader()`. The *http-browserify* module provides both, but previously only documented `response.getHeader()`. This changes the documentation to document `response.headers` instead. The `response.getHeader()` function is left undocumented as technically it does not match the node http module implementation.
The response object in Node's http module (an instance of http.IncomingMessage) exposes the response headers via
response.headers
(and notresponse.getHeader()
). This module does the opposite - http-browserify's response object hasresponse.getHeader()
(and notresponse.headers
).The response object should be changed to match Node core's http module by adding
.headers
and removing.getHeader()
.The text was updated successfully, but these errors were encountered: