| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -623,8 +623,11 @@ is finished. | |||
| 623 | 623 | ### request.finished | |
| 624 | 624 | <!-- YAML | |
| 625 | 625 | added: v0.0.1 | |
| 626 | + deprecated: REPLACEME | ||
| 626 | 627 | --> | |
| 627 | 628 | ||
| 629 | + > Stability: 0 - Deprecated. Use [`request.writableEnded`][]. | ||
| 630 | + | ||
| 628 | 631 | * {boolean} | |
| 629 | 632 | ||
| 630 | 633 | The `request.finished` property will be `true` if [`request.end()`][] | |
@@ -1305,8 +1308,11 @@ is finished. | |||
| 1305 | 1308 | ### response.finished | |
| 1306 | 1309 | <!-- YAML | |
| 1307 | 1310 | added: v0.0.2 | |
| 1311 | + deprecated: REPLACEME | ||
| 1308 | 1312 | --> | |
| 1309 | 1313 | ||
| 1314 | + > Stability: 0 - Deprecated. Use [`response.writableEnded`][]. | ||
| 1315 | + | ||
| 1310 | 1316 | * {boolean} | |
| 1311 | 1317 | ||
| 1312 | 1318 | The `response.finished` property will be `true` if [`response.end()`][] | |
@@ -2417,12 +2423,14 @@ not abort the request or do anything besides add a `'timeout'` event. | |||
| 2417 | 2423 | [`request.socket.getPeerCertificate()`]: tls.html#tls_tlssocket_getpeercertificate_detailed | |
| 2418 | 2424 | [`request.socket`]: #http_request_socket | |
| 2419 | 2425 | [`request.writableFinished`]: #http_request_writablefinished | |
| 2426 | + [`request.writableEnded`]: #http_request_writableended | ||
| 2420 | 2427 | [`request.write(data, encoding)`]: #http_request_write_chunk_encoding_callback | |
| 2421 | 2428 | [`response.end()`]: #http_response_end_data_encoding_callback | |
| 2422 | 2429 | [`response.getHeader()`]: #http_response_getheader_name | |
| 2423 | 2430 | [`response.setHeader()`]: #http_response_setheader_name_value | |
| 2424 | 2431 | [`response.socket`]: #http_response_socket | |
| 2425 | 2432 | [`response.writableFinished`]: #http_response_writablefinished | |
| 2433 | + [`response.writableEnded`]: #http_response_writableended | ||
| 2426 | 2434 | [`response.write()`]: #http_response_write_chunk_encoding_callback | |
| 2427 | 2435 | [`response.write(data, encoding)`]: #http_response_write_chunk_encoding_callback | |
| 2428 | 2436 | [`response.writeContinue()`]: #http_response_writecontinue | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3075,8 +3075,11 @@ is finished. | |||
| 3075 | 3075 | #### response.finished | |
| 3076 | 3076 | <!-- YAML | |
| 3077 | 3077 | added: v8.4.0 | |
| 3078 | + deprecated: REPLACEME | ||
| 3078 | 3079 | --> | |
| 3079 | 3080 | ||
| 3081 | + > Stability: 0 - Deprecated. Use [`response.writableEnded`][]. | ||
| 3082 | + | ||
| 3080 | 3083 | * {boolean} | |
| 3081 | 3084 | ||
| 3082 | 3085 | Boolean value that indicates whether the response has completed. Starts | |
@@ -3559,6 +3562,7 @@ following additional properties: | |||
| 3559 | 3562 | [`response.end()`]: #http2_response_end_data_encoding_callback | |
| 3560 | 3563 | [`response.setHeader()`]: #http2_response_setheader_name_value | |
| 3561 | 3564 | [`response.socket`]: #http2_response_socket | |
| 3565 | + [`response.writableEnded`]: #http2_response_writableended | ||
| 3562 | 3566 | [`response.write()`]: #http2_response_write_chunk_encoding_callback | |
| 3563 | 3567 | [`response.write(data, encoding)`]: http.html#http_response_write_chunk_encoding_callback | |
| 3564 | 3568 | [`response.writeContinue()`]: #http2_response_writecontinue | |
| Back | FazBrowse Home | New Git URL |
0 commit comments