A domain name or IP address of the server to issue the request to. Defaults to 'localhost'.
Alias for host. To support url.parse() hostname is preferred over host.
IP address family to use when resolving host and hostname. Valid values are 4 or 6. When unspecified, both IP v4 and v6 will be used.
Port of remote server. Defaults to 443.
Local interface to bind for network connections.
Unix Domain Socket (use one of host:port or socketPath).
A string specifying the HTTP request method. Defaults to 'GET'.
Request path. Defaults to '/'. Should include query string if any. E.G. '/index.html?page=12'. An exception is thrown when the request path contains illegal characters. Currently, only spaces are rejected but that may change in the future.
An object containing request headers.
Basic authentication i.e. 'user:password' to compute an Authorization header.
Controls Agent behavior. When an Agent is used request will default to Connection: keep-alive. Possible values:
Controls Agent behavior.
Controls Agent behavior. When an Agent is used request will default to Connection: keep-alive. Possible values:
Basic authentication i.e.
Basic authentication i.e. 'user:password' to compute an Authorization header.
IP address family to use when resolving host and hostname.
IP address family to use when resolving host and hostname. Valid values are 4 or 6. When unspecified, both IP v4 and v6 will be used.
An object containing request headers.
A domain name or IP address of the server to issue the request to.
A domain name or IP address of the server to issue the request to. Defaults to 'localhost'.
Alias for host.
Alias for host. To support url.parse() hostname is preferred over host.
Local interface to bind for network connections.
A string specifying the HTTP request method.
A string specifying the HTTP request method. Defaults to 'GET'.
Request path.
Request path. Defaults to '/'. Should include query string if any. E.G. '/index.html?page=12'. An exception is thrown when the request path contains illegal characters. Currently, only spaces are rejected but that may change in the future.
Port of remote server.
Port of remote server. Defaults to 443.
Unix Domain Socket (use one of host:port or socketPath).
Server Options