You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ node <name>.js
<go to: http://localhost:<port>/>
[...]
TypeError: req.getHeaders is not a function
with req.headers, you don't.
However, the example in the docs (both v16 and v18) shows the (non-working) use of: console.log(request.getHeaders());
Affected URL(s)
https://nodejs.org/docs/latest-v16.x/api/http.html#messageheaders
https://nodejs.org/docs/latest-v18.x/api/http.html#messageheaders
Description of the problem
With
req.getHeaders(), you get an error:with
req.headers, you don't.However, the example in the docs (both v16 and v18) shows the (non-working) use of:
console.log(request.getHeaders());..under the sub-section message.headers.