@@ -2521,6 +2521,27 @@ Type: Documentation-only (supports [`--pending-deprecation`][])
2521
2521
The `process._tickCallback` property was never documented as
2522
2522
an officially supported API.
2523
2523
2524
+ <a id="DEP0136"></a>
2525
+ ### DEP0136: `http` `finished`
2526
+ <!-- YAML
2527
+ changes:
2528
+ - version: REPLACEME
2529
+ pr-url: https://github.com/nodejs/node/pull/28679
2530
+ description: Documentation-only deprecation.
2531
+ -->
2532
+
2533
+ Type: Documentation-only
2534
+
2535
+ [`response.finished`][] indicates whether [`response.end()`][] has been
2536
+ called, not whether `' finish' ` has been emitted and the underlying data
2537
+ is flushed.
2538
+
2539
+ Use [`response.writableFinished`][] or [`response.writableEnded`][]
2540
+ accordingly instead to avoid the ambigiuty.
2541
+
2542
+ To maintain existing behaviour `response.finished` should be replaced with
2543
+ `response.writableEnded`.
2544
+
2524
2545
[`--http-parser=legacy`]: cli.html#cli_http_parser_library
2525
2546
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
2526
2547
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
@@ -2580,6 +2601,10 @@ an officially supported API.
2580
2601
[`request.connection`]: http.html#http_request_connection
2581
2602
[`response.socket`]: http.html#http_response_socket
2582
2603
[`response.connection`]: http.html#http_response_connection
2604
+ [`response.end()`]: http.html#http_response_end_data_encoding_callback
2605
+ [`response.finished`]: #http_response_finished
2606
+ [`response.writableFinished`]: #http_response_writablefinished
2607
+ [`response.writableEnded`]: #http_response_writableended
2583
2608
[`script.createCachedData()`]: vm.html#vm_script_createcacheddata
2584
2609
[`setInterval()`]: timers.html#timers_setinterval_callback_delay_args
2585
2610
[`setTimeout()`]: timers.html#timers_settimeout_callback_delay_args
0 commit comments