| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 44fdf95 commit 28d8614
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -393,7 +393,7 @@ agent. Do not modify. | |||
| 393 | 393 | added: v0.1.17 | |
| 394 | 394 | --> | |
| 395 | 395 | ||
| 396 | - * Extends: {Stream} | ||
| 396 | + * Extends: {http.OutgoingMessage} | ||
| 397 | 397 | ||
| 398 | 398 | This object is created internally and returned from [`http.request()`][]. It | |
| 399 | 399 | represents an _in-progress_ request whose header has already been queued. The | |
@@ -2221,7 +2221,7 @@ Key-value pairs of header names and values. Header names are lower-cased. | |||
| 2221 | 2221 | // { 'user-agent': 'curl/7.22.0', | |
| 2222 | 2222 | // host: '127.0.0.1:8000', | |
| 2223 | 2223 | // accept: '*/*' } | |
| 2224 | - console.log(request.headers); | ||
| 2224 | + console.log(request.getHeaders()); | ||
| 2225 | 2225 | ``` | |
| 2226 | 2226 | ||
| 2227 | 2227 | Duplicates in raw headers are handled in the following ways, depending on the | |
@@ -2388,15 +2388,15 @@ Accept: text/plain | |||
| 2388 | 2388 | To parse the URL into its parts: | |
| 2389 | 2389 | ||
| 2390 | 2390 | ```js | |
| 2391 | - new URL(request.url, `http://${request.headers.host}`); | ||
| 2391 | + new URL(request.url, `http://${request.getHeaders().host}`); | ||
| 2392 | 2392 | ``` | |
| 2393 | 2393 | ||
| 2394 | 2394 | When `request.url` is `'/status?name=ryan'` and | |
| 2395 | - `request.headers.host` is `'localhost:3000'`: | ||
| 2395 | + `request.getHeaders().host` is `'localhost:3000'`: | ||
| 2396 | 2396 | ||
| 2397 | 2397 | ```console | |
| 2398 | 2398 | $ node | |
| 2399 | - > new URL(request.url, `http://${request.headers.host}`) | ||
| 2399 | + > new URL(request.url, `http://${request.getHeaders().host}`) | ||
| 2400 | 2400 | URL { | |
| 2401 | 2401 | href: 'http://localhost:3000/status?name=ryan', | |
| 2402 | 2402 | origin: 'http://localhost:3000', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -148,6 +148,7 @@ const customTypesMap = { | |||
| 148 | 148 | 'http.Agent': 'http.html#class-httpagent', | |
| 149 | 149 | 'http.ClientRequest': 'http.html#class-httpclientrequest', | |
| 150 | 150 | 'http.IncomingMessage': 'http.html#class-httpincomingmessage', | |
| 151 | + 'http.OutgoingMessage': 'http.html#class-httpoutgoingmessage', | ||
| 151 | 152 | 'http.Server': 'http.html#class-httpserver', | |
| 152 | 153 | 'http.ServerResponse': 'http.html#class-httpserverresponse', | |
| 153 | 154 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments