| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a8926d1 commit d1d9f2d
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2827,6 +2827,28 @@ Type: Documentation-only (supports [`--pending-deprecation`][]) | |||
| 2827 | 2827 | The remapping of specifiers ending in `"/"` like `import 'pkg/x/'` is deprecated | |
| 2828 | 2828 | for package `"exports"` and `"imports"` pattern resolutions. | |
| 2829 | 2829 | ||
| 2830 | + ### DEP0XXX: `.aborted` property and `'abort'`, `'aborted'` event in `http` | ||
| 2831 | + <!-- YAML | ||
| 2832 | + changes: | ||
| 2833 | + - version: REPLACEME | ||
| 2834 | + pr-url: https://github.com/nodejs/node/pull/36670 | ||
| 2835 | + description: Documentation-only deprecation. | ||
| 2836 | + --> | ||
| 2837 | + | ||
| 2838 | + Type: Documentation-only | ||
| 2839 | + | ||
| 2840 | + Move to {Stream} API instead, as the [`http.ClientRequest`][], | ||
| 2841 | + [`http.ServerResponse`][], and [`http.IncomingMessage`][] are all stream-based. | ||
| 2842 | + Check `stream.destroyed` instead of the `.aborted` property, and listen for | ||
| 2843 | + `'close'` instead of `'abort'`, `'aborted'` event. | ||
| 2844 | + | ||
| 2845 | + The `.aborted` property and `'abort'` event are only useful for detecting | ||
| 2846 | + `.abort()` calls. For closing a request early, use the Stream | ||
| 2847 | + `.destroy([error])` then check the `.destroyed` property and `'close'` event | ||
| 2848 | + should have the same effect. The receiving end should also check the | ||
| 2849 | + [`readable.readableEnded`][] value on [`http.IncomingMessage`][] to get whether | ||
| 2850 | + it was an aborted or graceful destroy. | ||
| 2851 | + | ||
| 2830 | 2852 | [Legacy URL API]: url.md#legacy-url-api | |
| 2831 | 2853 | [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf | |
| 2832 | 2854 | [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 | |
@@ -2884,6 +2906,9 @@ for package `"exports"` and `"imports"` pattern resolutions. | |||
| 2884 | 2906 | [`fs.read()`]: fs.md#fsreadfd-buffer-offset-length-position-callback | |
| 2885 | 2907 | [`fs.readSync()`]: fs.md#fsreadsyncfd-buffer-offset-length-position | |
| 2886 | 2908 | [`fs.stat()`]: fs.md#fsstatpath-options-callback | |
| 2909 | + [`http.ClientRequest`]: http.md#class-httpclientrequest | ||
| 2910 | + [`http.IncomingMessage`]: http.md#class-httpincomingmessage | ||
| 2911 | + [`http.ServerResponse`]: http.md#class-httpserverresponse | ||
| 2887 | 2912 | [`http.get()`]: http.md#httpgetoptions-callback | |
| 2888 | 2913 | [`http.request()`]: http.md#httprequestoptions-callback | |
| 2889 | 2914 | [`https.get()`]: https.md#httpsgetoptions-callback | |
@@ -2896,6 +2921,7 @@ for package `"exports"` and `"imports"` pattern resolutions. | |||
| 2896 | 2921 | [`process.env`]: process.md#processenv | |
| 2897 | 2922 | [`process.mainModule`]: process.md#processmainmodule | |
| 2898 | 2923 | [`punycode`]: punycode.md | |
| 2924 | + [`readable.readableEnded`]: stream.md#readablereadableended | ||
| 2899 | 2925 | [`request.abort()`]: http.md#requestabort | |
| 2900 | 2926 | [`request.connection`]: http.md#requestconnection | |
| 2901 | 2927 | [`request.destroy()`]: http.md#requestdestroyerror | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -405,8 +405,11 @@ body which has been transmitted are equal or not. | |||
| 405 | 405 | ### Event: `'abort'` | |
| 406 | 406 | <!-- YAML | |
| 407 | 407 | added: v1.4.1 | |
| 408 | + deprecated: REPLACEME | ||
| 408 | 409 | --> | |
| 409 | 410 | ||
| 411 | + > Stability: 0 - Deprecated. Listen for the `'close'` event instead. | ||
| 412 | + | ||
| 410 | 413 | Emitted when the request has been aborted by the client. This event is only | |
| 411 | 414 | emitted on the first call to `abort()`. | |
| 412 | 415 | ||
@@ -562,7 +565,7 @@ added: v0.7.8 | |||
| 562 | 565 | --> | |
| 563 | 566 | ||
| 564 | 567 | Emitted when the underlying socket times out from inactivity. This only notifies | |
| 565 | - that the socket has been idle. The request must be aborted manually. | ||
| 568 | + that the socket has been idle. The request must be destroyed manually. | ||
| 566 | 569 | ||
| 567 | 570 | See also: [`request.setTimeout()`][]. | |
| 568 | 571 | ||
@@ -643,12 +646,15 @@ in the response to be dropped and the socket to be destroyed. | |||
| 643 | 646 | ### `request.aborted` | |
| 644 | 647 | <!-- YAML | |
| 645 | 648 | added: v0.11.14 | |
| 649 | + deprecated: REPLACEME | ||
| 646 | 650 | changes: | |
| 647 | 651 | - version: v11.0.0 | |
| 648 | 652 | pr-url: https://github.com/nodejs/node/pull/20230 | |
| 649 | 653 | description: The `aborted` property is no longer a timestamp number. | |
| 650 | 654 | --> | |
| 651 | 655 | ||
| 656 | + > Stability: 0 - Deprecated. Check [`request.destroyed`][] instead. | ||
| 657 | + | ||
| 652 | 658 | * {boolean} | |
| 653 | 659 | ||
| 654 | 660 | The `request.aborted` property will be `true` if the request has | |
@@ -1984,8 +1990,11 @@ may be reused multiple times in case of keep-alive. | |||
| 1984 | 1990 | ### Event: `'aborted'` | |
| 1985 | 1991 | <!-- YAML | |
| 1986 | 1992 | added: v0.3.8 | |
| 1993 | + deprecated: REPLACEME | ||
| 1987 | 1994 | --> | |
| 1988 | 1995 | ||
| 1996 | + > Stability: 0 - Deprecated. Listen for `'close'` event instead. | ||
| 1997 | + | ||
| 1989 | 1998 | Emitted when the request has been aborted. | |
| 1990 | 1999 | ||
| 1991 | 2000 | ### Event: `'close'` | |
@@ -1998,8 +2007,11 @@ Indicates that the underlying connection was closed. | |||
| 1998 | 2007 | ### `message.aborted` | |
| 1999 | 2008 | <!-- YAML | |
| 2000 | 2009 | added: v10.1.0 | |
| 2010 | + deprecated: REPLACEME | ||
| 2001 | 2011 | --> | |
| 2002 | 2012 | ||
| 2013 | + > Stability: 0 - Deprecated. Check `message.destroyed` from {stream.Readable}. | ||
| 2014 | + | ||
| 2003 | 2015 | * {boolean} | |
| 2004 | 2016 | ||
| 2005 | 2017 | The `message.aborted` property will be `true` if the request has | |
@@ -3231,6 +3243,7 @@ try { | |||
| 3231 | 3243 | [`outgoingMessage.socket`]: #outgoingmessagesocket | |
| 3232 | 3244 | [`removeHeader(name)`]: #requestremoveheadername | |
| 3233 | 3245 | [`request.destroy()`]: #requestdestroyerror | |
| 3246 | + [`request.destroyed`]: #requestdestroyed | ||
| 3234 | 3247 | [`request.end()`]: #requestenddata-encoding-callback | |
| 3235 | 3248 | [`request.flushHeaders()`]: #requestflushheaders | |
| 3236 | 3249 | [`request.getHeader()`]: #requestgetheadername | |
| Back | FazBrowse Home | New Git URL |
0 commit comments