@@ -2826,6 +2826,28 @@ Type: Documentation-only (supports [`--pending-deprecation`][])
2826
2826
The remapping of specifiers ending in ` "/" ` like ` import 'pkg/x/' ` is deprecated
2827
2827
for package ` "exports" ` and ` "imports" ` pattern resolutions.
2828
2828
2829
+ ### DEP0XXX: ` .aborted ` property and ` 'abort' ` , ` 'aborted' ` event in ` http `
2830
+ <!-- YAML
2831
+ changes:
2832
+ - version: REPLACEME
2833
+ pr-url: https://github.com/nodejs/node/pull/36670
2834
+ description: Documentation-only deprecation.
2835
+ -->
2836
+
2837
+ Type: Documentation-only
2838
+
2839
+ Move to {Stream} API instead, as the [ ` http.ClientRequest ` ] [ ] ,
2840
+ [ ` http.ServerResponse ` ] [ ] , and [ ` http.IncomingMessage ` ] [ ] are all stream-based.
2841
+ Check ` stream.destroyed ` instead of the ` .aborted ` property, and listen for
2842
+ ` 'close' ` instead of ` 'abort' ` , ` 'aborted' ` event.
2843
+
2844
+ The ` .aborted ` property and ` 'abort' ` event are only useful for detecting
2845
+ ` .abort() ` calls. For closing a request early, use the Stream
2846
+ ` .destroy([error]) ` then check the ` .destroyed ` property and ` 'close' ` event
2847
+ should have the same effect. The receiving end should also check the
2848
+ [ ` readable.readableEnded ` ] [ ] value on [ ` http.IncomingMessage ` ] [ ] to get whether
2849
+ it was an aborted or graceful destroy.
2850
+
2829
2851
[ Legacy URL API ] : url.md#url_legacy_url_api
2830
2852
[ NIST SP 800-38D ] : https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
2831
2853
[ RFC 6066 ] : https://tools.ietf.org/html/rfc6066#section-3
@@ -2883,6 +2905,9 @@ for package `"exports"` and `"imports"` pattern resolutions.
2883
2905
[ `fs.read()` ] : fs.md#fs_fs_read_fd_buffer_offset_length_position_callback
2884
2906
[ `fs.readSync()` ] : fs.md#fs_fs_readsync_fd_buffer_offset_length_position
2885
2907
[ `fs.stat()` ] : fs.md#fs_fs_stat_path_options_callback
2908
+ [ `http.ClientRequest` ] : #http_class_http_clientrequest
2909
+ [ `http.IncomingMessage` ] : #http_class_http_incomingmessage
2910
+ [ `http.ServerResponse` ] : #http_class_http_serverresponse
2886
2911
[ `http.get()` ] : http.md#http_http_get_options_callback
2887
2912
[ `http.request()` ] : http.md#http_http_request_options_callback
2888
2913
[ `https.get()` ] : https.md#https_https_get_options_callback
@@ -2895,6 +2920,7 @@ for package `"exports"` and `"imports"` pattern resolutions.
2895
2920
[ `process.env` ] : process.md#process_process_env
2896
2921
[ `process.mainModule` ] : process.md#process_process_mainmodule
2897
2922
[ `punycode` ] : punycode.md
2923
+ [ `readable.readableEnded` ] : stream.md#stream_readable_readableended
2898
2924
[ `request.abort()` ] : http.md#http_request_abort
2899
2925
[ `request.connection` ] : http.md#http_request_connection
2900
2926
[ `request.destroy()` ] : http.md#http_request_destroy_error
0 commit comments