diff options
author | Robert Nagy <ronagy@icloud.com> | 2020-04-13 11:02:03 +0200 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2020-04-28 16:28:34 +0100 |
commit | 31c797cb116287e46087ba218056a70f67256fdd (patch) | |
tree | a4acdfc525f465573a372b760fa0562ce3308eeb /doc/api/deprecations.md | |
parent | f116825d560b72c9348c02be83b7d7e06b9e31e4 (diff) | |
download | node-new-31c797cb116287e46087ba218056a70f67256fdd.tar.gz |
http: doc deprecate abort and improve docs
Doc deprecates ClientRequest.abort in favor of
ClientRequest.destroy. Also improves event order
documentation for abort and destroy.
Refs: https://github.com/nodejs/node/issues/32225
PR-URL: https://github.com/nodejs/node/pull/32807
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'doc/api/deprecations.md')
-rw-r--r-- | doc/api/deprecations.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 9833e0c421..0662e32295 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2651,6 +2651,19 @@ written twice. This introduces a race condition between threads, and is a potential security vulnerability. There is no safe, cross-platform alternative API. +<a id="DEP0XXX"></a> +### DEP0XXX: Use `request.destroy()` instead of `request.abort()` +<!-- YAML +changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/32807 + description: Documentation-only deprecation. +--> + +Type: Documentation-only + +Use [`request.destroy()`][] instead of [`request.abort()`][]. + [`--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 @@ -2712,8 +2725,10 @@ API. [`punycode`]: punycode.html [`require.extensions`]: modules.html#modules_require_extensions [`require.main`]: modules.html#modules_accessing_the_main_module +[`request.abort()`]: http.html#http_request_abort [`request.socket`]: http.html#http_request_socket [`request.connection`]: http.html#http_request_connection +[`request.destroy()`]: http.html#http_request_destroy_error [`response.socket`]: http.html#http_response_socket [`response.connection`]: http.html#http_response_connection [`response.end()`]: http.html#http_response_end_data_encoding_callback |