Skip to content

Param list format options

Lloyd Brookes edited this page Oct 11, 2016 · 3 revisions

1. Sometimes, the default @param list can look too crowded and squashed.

request(options)

Makes a request to a secure web server.

Kind: global function

Param Type Default Description
options object | string options can be an object or a string. If options is a string, it is automatically parsed with url.parse(). All options from http.request() are valid.
[options.host] string "localhost" A domain name or IP address of the server to issue the request to. Defaults to 'localhost'.
[options.family] number 4 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.
[options.path] string "/" 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.
[options.rejectUnauthorized] boolean true If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent.

2. In this case, switch to the 'list' format using --param-list-format list.

request(options)

Makes a request to a secure web server.

Kind: global function
Params

  • options object | string - options can be an object or a string. If options is a string, it is automatically parsed with url.parse(). All options from http.request() are valid.

    • [.host] string = "localhost" - A domain name or IP address of the server to issue the request to. Defaults to 'localhost'.
    • [.family] number = 4 - 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.
    • [.path] string = "/" - 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.
    • [.rejectUnauthorized] boolean = true - If true, the server certificate is verified against the list of supplied CAs. An 'error' event is emitted if verification fails. Verification happens at the connection level, before the HTTP request is sent.
Clone this wiki locally