diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 0d97cd38df0673..3319755eefbe70 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2500,6 +2500,21 @@ Type: Runtime Passing a callback to [`worker.terminate()`][] is deprecated. Use the returned `Promise` instead, or a listener to the worker’s `'exit'` event. + +### DEP0XXX: ClientRequest.abort() is destroy + + +Type: Documentation-only + +[`ClientRequest.destroy()`][] should be the same as +[`ClientRequest.abort()`][]. Make ClientRequest more streamlike by deprecating + abort(). + [`--http-parser=legacy`]: cli.html#cli_http_parser_library [`--pending-deprecation`]: cli.html#cli_pending_deprecation [`--throw-deprecation`]: cli.html#cli_throw_deprecation @@ -2508,6 +2523,8 @@ Passing a callback to [`worker.terminate()`][] is deprecated. Use the returned [`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer [`Buffer.isBuffer()`]: buffer.html#buffer_class_method_buffer_isbuffer_obj [`Cipher`]: crypto.html#crypto_class_cipher +[`ClientRequest.abort()`]: #http.html#http_request_abort +[`ClientRequest.destroy()`]: #stream.html#stream_readable_destroy_error [`Decipher`]: crypto.html#crypto_class_decipher [`EventEmitter.listenerCount(emitter, eventName)`]: events.html#events_eventemitter_listenercount_emitter_eventname [`REPLServer.clearBufferedCommand()`]: repl.html#repl_replserver_clearbufferedcommand diff --git a/doc/api/http.md b/doc/api/http.md index 4923b6a61d840f..f3f2348e91bf0d 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -546,10 +546,14 @@ srv.listen(1337, '127.0.0.1', () => { ### request.abort() +> Stability: 0 - Deprecated: Use [`request.destroy()`][] instead. + Marks the request as aborting. Calling this will cause remaining data -in the response to be dropped and the socket to be destroyed. +in the response to be dropped and the socket to be destroyed. After +calling this method, no further errors will be emitted. ### request.aborted