Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http: deprecate aborted property and event #33345

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
http: deprecate aborted property and event
Refs: #33120
Refs: #33172
  • Loading branch information
ronag committed May 10, 2020
commit 304935f91408a6e147516837b65761aa6f043f8f
28 changes: 28 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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