diff --git a/lib/http.js b/lib/http.js index d7acafe4f317b8..6835789836d66b 100644 --- a/lib/http.js +++ b/lib/http.js @@ -62,28 +62,28 @@ function createServer(opts, requestListener) { /** * @typedef {object} HTTPRequestOptions - * @property {httpAgent.Agent | boolean} [agent] - * @property {string} [auth] - * @property {Function} [createConnection] - * @property {number} [defaultPort] - * @property {number} [family] - * @property {object} [headers] - * @property {number} [hints] - * @property {string} [host] - * @property {string} [hostname] - * @property {boolean} [insecureHTTPParser] - * @property {string} [localAddress] - * @property {number} [localPort] - * @property {Function} [lookup] - * @property {number} [maxHeaderSize] - * @property {string} [method] - * @property {string} [path] - * @property {number} [port] - * @property {string} [protocol] - * @property {boolean} [setHost] - * @property {string} [socketPath] - * @property {number} [timeout] - * @property {AbortSignal} [signal] + * @property {httpAgent.Agent | boolean} [agent] Controls Agent behavior. + * @property {string} [auth] Basic authentication ('user:password') to compute an Authorization header. + * @property {Function} [createConnection] Produces a socket/stream to use when the agent option is not used. + * @property {number} [defaultPort] Default port for the protocol. + * @property {number} [family] IP address family to use when resolving host or hostname. + * @property {object} [headers] An object containing request headers. + * @property {number} [hints] Optional dns.lookup() hints. + * @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 {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(). + * @property {number} [maxHeaderSize] Overrides the --max-http-header-size value for responses received from the server. + * @property {string} [method] A string specifying the HTTP request method. + * @property {string} [path] Request path. + * @property {number} [port] Port of remote server. + * @property {string} [protocol] Protocol to use. + * @property {boolean} [setHost] Specifies whether or not to automatically add the Host header. + * @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. */ /**