Skip to content

Commit 304935f

Browse files
committed
http: deprecate aborted property and event
Refs: nodejs#33120 Refs: nodejs#33172
1 parent 8a6fab0 commit 304935f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

doc/api/deprecations.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2668,6 +2668,34 @@ Type: Documentation-only
26682668
26692669
Use [`request.destroy()`][] instead of [`request.abort()`][].
26702670
2671+
<a id="DEP0XXX"></a>
2672+
### DEP0XX: Use `request.destroyed` instead of `request.aborted`
2673+
<!-- YAML
2674+
changes:
2675+
- version:
2676+
- REPLACEME
2677+
pr-url: https://github.com/nodejs/node/pull/33345
2678+
description: Documentation-only deprecation.
2679+
-->
2680+
2681+
Type: Documentation-only
2682+
2683+
Use [`request.destroyed`][] instead of [`request.aborted`][].
2684+
2685+
<a id="DEP0XXX"></a>
2686+
### DEP0XX: Use `'error'` event instead of `'aborted'`
2687+
<!-- YAML
2688+
changes:
2689+
- version:
2690+
- REPLACEME
2691+
pr-url: https://github.com/nodejs/node/pull/33345
2692+
description: Documentation-only deprecation.
2693+
-->
2694+
2695+
Type: Documentation-only
2696+
2697+
Use `'error'` event instead of `'aborted'`.
2698+
26712699
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
26722700
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
26732701
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size

doc/api/http.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,12 @@ changes:
584584
- version: v11.0.0
585585
pr-url: https://github.com/nodejs/node/pull/20230
586586
description: The `aborted` property is no longer a timestamp number.
587+
deprecated:
588+
- REPLACEME
587589
-->
588590

591+
> Stability: 0 - Deprecated: Use [`request.destroyed`][] instead.
592+
589593
* {boolean}
590594

591595
The `request.aborted` property will be `true` if the request has
@@ -1799,8 +1803,13 @@ status, headers and data.
17991803
### Event: `'aborted'`
18001804
<!-- YAML
18011805
added: v0.3.8
1806+
changes:
1807+
deprecated:
1808+
- REPLACEME
18021809
-->
18031810

1811+
> Stability: 0 - Deprecated: Use the `'error'` event instead.
1812+
18041813
Emitted when the request has been aborted.
18051814

18061815
### Event: `'close'`

0 commit comments

Comments
 (0)