lib: update params in jsdoc for HTTPRequestOptions

PR-URL: https://github.com/nodejs/node/pull/49872
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
Jungku Lee 2023-09-29 20:14:24 +09:00 committed by GitHub
parent c935d4c8fa
commit 6aa7101960
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -76,6 +76,7 @@ function createServer(opts, requestListener) {
* @property {string} [host] A domain name or IP address of the server to issue the request to.
* @property {string} [hostname] Alias for host.
* @property {boolean} [insecureHTTPParser] Use an insecure HTTP parser that accepts invalid HTTP headers when true.
* @property {boolean} [joinDuplicateHeaders] Multiple header that joined with `,` field line values.
* @property {string} [localAddress] Local interface to bind for network connections.
* @property {number} [localPort] Local port to connect from.
* @property {Function} [lookup] Custom lookup function. Default: dns.lookup().
@ -88,6 +89,7 @@ function createServer(opts, requestListener) {
* @property {AbortSignal} [signal] An AbortSignal that may be used to abort an ongoing request.
* @property {string} [socketPath] Unix domain socket.
* @property {number} [timeout] A number specifying the socket timeout in milliseconds.
* @property {Array} [uniqueHeaders] A list of request headers that should be sent only once.
*/
/**

View File

@ -392,6 +392,7 @@ function request(...args) {
* host?: string;
* hostname?: string;
* insecureHTTPParser?: boolean;
* joinDuplicateHeaders?: boolean;
* localAddress?: string;
* localPort?: number;
* lookup?: Function;
@ -404,6 +405,7 @@ function request(...args) {
* socketPath?: string;
* timeout?: number;
* signal?: AbortSignal;
* uniqueHeaders?: Array;
* } | string | URL} [options]
* @param {Function} [cb]
* @returns {ClientRequest}