Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed May 11, 2020
1 parent 304935f commit 73beedc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2680,7 +2680,12 @@ changes:
Type: Documentation-only
Use [`request.destroyed`][] instead of [`request.aborted`][].
Use [`request.destroyed`][] and [`request.readableEnded`][] instead of
[`request.aborted`][].
```js
const aborted = request.destroyed && !request.readableEnded
```
<a id="DEP0XXX"></a>
### DEP0XX: Use `'error'` event instead of `'aborted'`
Expand Down Expand Up @@ -2757,10 +2762,13 @@ Use `'error'` event instead of `'aborted'`.
[`punycode`]: punycode.html
[`require.extensions`]: modules.html#modules_require_extensions
[`require.main`]: modules.html#modules_accessing_the_main_module
[`request.aborted`]: http.html#http_request_aborted
[`request.abort()`]: http.html#http_request_abort
[`request.socket`]: http.html#http_request_socket
[`request.connection`]: http.html#http_request_connection
[`request.destroyed`]: http.html#http_request_destroyed
[`request.destroy()`]: http.html#http_request_destroy_error
[`request.readableEnded`]: http.html#http_request_readableended
[`response.socket`]: http.html#http_response_socket
[`response.connection`]: http.html#http_response_connection
[`response.end()`]: http.html#http_response_end_data_encoding_callback
Expand Down
10 changes: 9 additions & 1 deletion doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ changes:
- REPLACEME
-->

> Stability: 0 - Deprecated: Use [`request.destroyed`][] instead.
> Stability: 0 - Deprecated: Use [`request.destroyed`][] and
[`request.readableEnded`][] instead.

* {boolean}

Expand Down Expand Up @@ -1822,10 +1823,15 @@ Indicates that the underlying connection was closed.
### `message.aborted`
<!-- YAML
added: v10.1.0
deprecated:
- REPLACEME
-->

* {boolean}

> Stability: 0 - Deprecated: Use [`message.destroyed`][] and
[`message.readableEnded`][] instead.

The `message.aborted` property will be `true` if the request has
been aborted.

Expand Down Expand Up @@ -2597,10 +2603,12 @@ try {
[`removeHeader(name)`]: #http_request_removeheader_name
[`request.end()`]: #http_request_end_data_encoding_callback
[`request.destroy()`]: #http_request_destroy_error
[`request.destroyed`]: #http_request_destroyed
[`request.flushHeaders()`]: #http_request_flushheaders
[`request.getHeader()`]: #http_request_getheader_name
[`request.setHeader()`]: #http_request_setheader_name_value
[`request.setTimeout()`]: #http_request_settimeout_timeout_callback
[`request.readableEnded`]: #http_request_readableended
[`request.socket.getPeerCertificate()`]: tls.html#tls_tlssocket_getpeercertificate_detailed
[`request.socket`]: #http_request_socket
[`request.writableFinished`]: #http_request_writablefinished
Expand Down

0 comments on commit 73beedc

Please sign in to comment.