Skip to content

Commit

Permalink
http: deprecate aborted property and event
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed May 10, 2020
1 parent 8a6fab0 commit 304935f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
28 changes: 28 additions & 0 deletions doc/api/deprecations.md
Expand Up @@ -2668,6 +2668,34 @@ Type: Documentation-only
Use [`request.destroy()`][] instead of [`request.abort()`][].
<a id="DEP0XXX"></a>
### DEP0XX: Use `request.destroyed` instead of `request.aborted`
<!-- YAML
changes:
- version:
- REPLACEME
pr-url: https://github.com/nodejs/node/pull/33345
description: Documentation-only deprecation.
-->
Type: Documentation-only
Use [`request.destroyed`][] instead of [`request.aborted`][].
<a id="DEP0XXX"></a>
### DEP0XX: Use `'error'` event instead of `'aborted'`
<!-- YAML
changes:
- version:
- REPLACEME
pr-url: https://github.com/nodejs/node/pull/33345
description: Documentation-only deprecation.
-->
Type: Documentation-only
Use `'error'` event instead of `'aborted'`.
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
Expand Down
9 changes: 9 additions & 0 deletions doc/api/http.md
Expand Up @@ -584,8 +584,12 @@ changes:
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/20230
description: The `aborted` property is no longer a timestamp number.
deprecated:
- REPLACEME
-->

> Stability: 0 - Deprecated: Use [`request.destroyed`][] instead.
* {boolean}

The `request.aborted` property will be `true` if the request has
Expand Down Expand Up @@ -1799,8 +1803,13 @@ status, headers and data.
### Event: `'aborted'`
<!-- YAML
added: v0.3.8
changes:
deprecated:
- REPLACEME
-->

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

### Event: `'close'`
Expand Down

0 comments on commit 304935f

Please sign in to comment.