diff options
author | Robert Nagy <ronagy@icloud.com> | 2019-08-06 13:56:52 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-08-17 06:21:59 -0700 |
commit | 0daec61b9bdefbde1026f0dacb7ee38eb6a91771 (patch) | |
tree | 6597c5eb520cad876ded3c31c15c05d34df79a1b /doc | |
parent | 6f613d8abb05619e35c828b665a76215861bbf04 (diff) | |
download | android-node-v8-0daec61b9bdefbde1026f0dacb7ee38eb6a91771.tar.gz android-node-v8-0daec61b9bdefbde1026f0dacb7ee38eb6a91771.tar.bz2 android-node-v8-0daec61b9bdefbde1026f0dacb7ee38eb6a91771.zip |
http: replace superfluous connection property with getter/setter
PR-URL: https://github.com/nodejs/node/pull/29015
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: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/deprecations.md | 18 | ||||
-rw-r--r-- | doc/api/http.md | 6 | ||||
-rw-r--r-- | doc/api/http2.md | 16 |
3 files changed, 40 insertions, 0 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 0d97cd38df..edc00a0911 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2500,6 +2500,20 @@ Type: Runtime Passing a callback to [`worker.terminate()`][] is deprecated. Use the returned `Promise` instead, or a listener to the worker’s `'exit'` event. +<a id="DEP0XXX"></a> +### DEP0XXX: http connection +<!-- YAML +changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/29015 + description: Documentation-only deprecation. +--> + +Type: Documentation-only + +Prefer [`response.socket`][] over [`response.connection`] and +[`request.socket`][] over [`request.connection`]. + [`--http-parser=legacy`]: cli.html#cli_http_parser_library [`--pending-deprecation`]: cli.html#cli_pending_deprecation [`--throw-deprecation`]: cli.html#cli_throw_deprecation @@ -2555,6 +2569,10 @@ Passing a callback to [`worker.terminate()`][] is deprecated. Use the returned [`process.env`]: process.html#process_process_env [`punycode`]: punycode.html [`require.extensions`]: modules.html#modules_require_extensions +[`request.socket`]: http.html#http_request_socket +[`request.connection`]: http.html#http_request_connection +[`response.socket`]: http.html#http_response_socket +[`response.connection`]: http.html#http_response_connection [`script.createCachedData()`]: vm.html#vm_script_createcacheddata [`setInterval()`]: timers.html#timers_setinterval_callback_delay_args [`setTimeout()`]: timers.html#timers_settimeout_callback_delay_args diff --git a/doc/api/http.md b/doc/api/http.md index d5851b61db..c2ec3a7fd0 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -568,8 +568,11 @@ been aborted. ### request.connection <!-- YAML added: v0.3.0 +deprecated: REPLACEME --> +> Stability: 0 - Deprecated. Use [`request.socket`][]. + * {net.Socket} See [`request.socket`][]. @@ -1166,10 +1169,13 @@ will result in a [`TypeError`][] being thrown. ### response.connection <!-- YAML added: v0.3.0 +deprecated: REPLACEME --> * {net.Socket} +> Stability: 0 - Deprecated. Use [`response.socket`][]. + See [`response.socket`][]. ### response.end([data][, encoding][, callback]) diff --git a/doc/api/http2.md b/doc/api/http2.md index 8a92aad421..805a720a79 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2702,6 +2702,18 @@ added: v8.4.0 The request authority pseudo header field. It can also be accessed via `req.headers[':authority']`. +#### request.connection +<!-- YAML +added: v8.4.0 +deprecated: REPLACEME +--> + +> Stability: 0 - Deprecated. Use [`request.socket`][]. + +* {net.Socket|tls.TLSSocket} + +See [`request.socket`][]. + #### request.destroy([error]) <!-- YAML added: v8.4.0 @@ -2995,8 +3007,11 @@ will result in a [`TypeError`][] being thrown. #### response.connection <!-- YAML added: v8.4.0 +deprecated: REPLACEME --> +> Stability: 0 - Deprecated. Use [`response.socket`][]. + * {net.Socket|tls.TLSSocket} See [`response.socket`][]. @@ -3508,6 +3523,7 @@ following additional properties: [`net.Socket.prototype.unref()`]: net.html#net_socket_unref [`net.Socket`]: net.html#net_class_net_socket [`net.connect()`]: net.html#net_net_connect +[`request.socket`]: #http2_request_socket [`request.socket.getPeerCertificate()`]: tls.html#tls_tlssocket_getpeercertificate_detailed [`response.end()`]: #http2_response_end_data_encoding_callback [`response.setHeader()`]: #http2_response_setheader_name_value |