@@ -2548,6 +2548,27 @@ APIs that do not make sense to use in userland. File streams should always be
2548
2548
opened through their corresponding factory methods [`fs.createWriteStream()`][]
2549
2549
and [`fs.createReadStream()`][]) or by passing a file descriptor in options.
2550
2550
2551
+ <a id="DEP0136"></a>
2552
+ ### DEP0136: http finished
2553
+ <!-- YAML
2554
+ changes:
2555
+ - version: REPLACEME
2556
+ pr-url: https://github.com/nodejs/node/pull/28679
2557
+ description: Documentation-only deprecation.
2558
+ -->
2559
+
2560
+ Type: Documentation-only
2561
+
2562
+ [`response.finished`][] indicates whether [`response.end()`][] has been
2563
+ called, not whether `' finish' ` has been emitted and the underlying data
2564
+ is flushed.
2565
+
2566
+ Use [`response.writableFinished`][] or [`response.writableEnded`][]
2567
+ accordingly instead to avoid the ambigiuty.
2568
+
2569
+ To maintain existing behaviour `response.finished` should be replaced with
2570
+ `response.writableEnded`.
2571
+
2551
2572
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
2552
2573
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
2553
2574
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
@@ -2610,6 +2631,10 @@ and [`fs.createReadStream()`][]) or by passing a file descriptor in options.
2610
2631
[`request.connection`]: http.html#http_request_connection
2611
2632
[`response.socket`]: http.html#http_response_socket
2612
2633
[`response.connection`]: http.html#http_response_connection
2634
+ [`response.end()`]: http.html#http_response_end_data_encoding_callback
2635
+ [`response.finished`]: #http_response_finished
2636
+ [`response.writableFinished`]: #http_response_writablefinished
2637
+ [`response.writableEnded`]: #http_response_writableended
2613
2638
[`script.createCachedData()`]: vm.html#vm_script_createcacheddata
2614
2639
[`setInterval()`]: timers.html#timers_setinterval_callback_delay_args
2615
2640
[`setTimeout()`]: timers.html#timers_settimeout_callback_delay_args
0 commit comments