Comments (4)
there is no setHeader()
on http.IncomingMessage
, and it wouldn't really make sense if there was.
headers are either:
- set on requests by the client before sending to the server (http.ClientRequest)
or
- set on responses by the server before sending to the client (http.ServerResponse)
from express.
isn't the documentation wrong then?
from express.
isn't the documentation wrong then?
No, it's correct. The request object used by Express is http.IncomingMessage
(request received by the server) and not http.ClientRequest
(request that was sent from Node.js to another server), because Express is a server not a client.
from express.
no, and it does correctly link to http.IncomingMessage
.
in node, notice the request
event params are request
and response
and there the request
param is of type http.IncomingMessage
from express.
Related Issues (20)
- Error `cause` is not displayed HOT 7
- Cross-Origin-Opener-Policy HOT 1
- [v4] Deprecate `res.clearCookie` taking `maxAge` and `expires` parameters
- Attaching user-id header to axios interceptor in middleware (is it safe) HOT 1
- EDIT: False positive - HIGH vulnerability in dependency used, Cookie 0.6.0 HOT 2
- The connection must not be reset for "HTTP2-Settings" request HOT 3
- Add Feature to Update README.txt with Additional Information HOT 1
- Issue with parsing url query HOT 4
- Why can't we pass the URL parameters to middleware in router.use()? HOT 2
- Unable to set Cache-Control Header in nodeJS server response HOT 6
- Impossible to catch the cookie client side HOT 1
- Generator SASS option deprecated for dart-sass - fails with node-gyp errors HOT 1
- Outdated [email protected] package used by express HOT 1
- Investigate replacing `qs` HOT 22
- Feature Request: res.redirect() is able to send more than just GET requests HOT 4
- Feature request (already implemented): Adding unuse method that does opposite of use. HOT 3
- Confusing behavior of applying middleware to paths instead of routers HOT 10
- Broken template engines link in wiki HOT 5
- Requesting to nominate IamLizu as a triager
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express.