@@ -2699,6 +2699,27 @@ resolutions not in `node_modules`. This means there will not be deprecation
2699
2699
warnings for ` "exports" ` in dependencies. With ` --pending-deprecation ` , a
2700
2700
runtime warning results no matter where the ` "exports" ` usage occurs.
2701
2701
2702
+ <a id =" DEP0XXX " ></a >
2703
+ ### DEP0XXX: ` .aborted ` property and ` 'abort' ` , ` 'aborted' ` event in ` http `
2704
+ <!-- YAML
2705
+ changes:
2706
+ - version: REPLACEME
2707
+ pr-url: https://github.com/nodejs/node/pull/36670
2708
+ description: Documentation-only deprecation.
2709
+ -->
2710
+
2711
+ Type: Documentation-only
2712
+
2713
+ Move to {Stream} API instead, as the [ ` http.ClientRequest ` ] [ ] ,
2714
+ [ ` http.ServerResponse ` ] [ ] , and [ ` http.IncomingMessage ` ] [ ] are all stream-based.
2715
+ Check ` stream.destroyed ` instead of the ` .aborted ` property, and listen for
2716
+ ` 'close' ` instead of ` 'abort' ` , ` 'aborted' ` event.
2717
+
2718
+ The ` .aborted ` property and ` 'abort' ` event is only useful for detecting
2719
+ ` .abort() ` calls. For closing a request early, use the Stream
2720
+ ` .destroy([error]) ` then check the ` .destroyed ` property and ` 'close' ` event
2721
+ should have the same effect.
2722
+
2702
2723
[ Legacy URL API ] : url.md#url_legacy_url_api
2703
2724
[ NIST SP 800-38D ] : https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
2704
2725
[ RFC 6066 ] : https://tools.ietf.org/html/rfc6066#section-3
@@ -2753,6 +2774,9 @@ runtime warning results no matter where the `"exports"` usage occurs.
2753
2774
[ `fs.read()` ] : fs.md#fs_fs_read_fd_buffer_offset_length_position_callback
2754
2775
[ `fs.readSync()` ] : fs.md#fs_fs_readsync_fd_buffer_offset_length_position
2755
2776
[ `fs.stat()` ] : fs.md#fs_fs_stat_path_options_callback
2777
+ [ `http.ClientRequest` ] : #http_class_http_clientrequest
2778
+ [ `http.IncomingMessage` ] : #http_class_http_incomingmessage
2779
+ [ `http.ServerResponse` ] : #http_class_http_serverresponse
2756
2780
[ `http.get()` ] : http.md#http_http_get_options_callback
2757
2781
[ `http.request()` ] : http.md#http_http_request_options_callback
2758
2782
[ `https.get()` ] : https.md#https_https_get_options_callback
0 commit comments