@@ -2827,6 +2827,28 @@ Type: Documentation-only (supports [`--pending-deprecation`][])
28272827The remapping of specifiers ending in ` "/" ` like ` import 'pkg/x/' ` is deprecated
28282828for package ` "exports" ` and ` "imports" ` pattern resolutions.
28292829
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+
28302852[ Legacy URL API ] : url.md#legacy-url-api
28312853[ NIST SP 800-38D ] : https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
28322854[ RFC 6066 ] : https://tools.ietf.org/html/rfc6066#section-3
@@ -2884,6 +2906,9 @@ for package `"exports"` and `"imports"` pattern resolutions.
28842906[ `fs.read()` ] : fs.md#fsreadfd-buffer-offset-length-position-callback
28852907[ `fs.readSync()` ] : fs.md#fsreadsyncfd-buffer-offset-length-position
28862908[ `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
28872912[ `http.get()` ] : http.md#httpgetoptions-callback
28882913[ `http.request()` ] : http.md#httprequestoptions-callback
28892914[ `https.get()` ] : https.md#httpsgetoptions-callback
@@ -2896,6 +2921,7 @@ for package `"exports"` and `"imports"` pattern resolutions.
28962921[ `process.env` ] : process.md#processenv
28972922[ `process.mainModule` ] : process.md#processmainmodule
28982923[ `punycode` ] : punycode.md
2924+ [ `readable.readableEnded` ] : stream.md#readablereadableended
28992925[ `request.abort()` ] : http.md#requestabort
29002926[ `request.connection` ] : http.md#requestconnection
29012927[ `request.destroy()` ] : http.md#requestdestroyerror
0 commit comments