-
Notifications
You must be signed in to change notification settings - Fork 151
Param list format options
Lloyd Brookes edited this page Oct 12, 2016
·
3 revisions
1. Sometimes, the default @param
list format (table
) can look too crowded and squashed:
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
.
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 fromhttp.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.
- [.host]
3. Source code for this example:
/**
* Makes a request to a secure web server.
* @param 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.
* @param [options.host=localhost] {string} - A domain name or IP address of the server to issue the request to. Defaults to 'localhost'.
* @param [options.family=4] {number} - 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.
* @param [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.
* @param [options.rejectUnauthorized=true] {boolean} - 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.
*/
function request (options) {}
- Home
- How jsdoc2md works
- Additional jsdoc tags supported
- Cherry picking which documentation appears in output
- Showcase ...
- Create ...
- How To ...
- How to use with npm run
- How to use with gulp
- How to create one output file per class
- How to document a AMD module
- How to document a CommonJS module (exports)
- How to document a CommonJS module (module.exports)
- How to document an ES2015 module (multiple named exports)
- How to document an ES2015 module (single default export)
- How to document Promises (using custom tags)
- How to document a ToDo list
- How to document ES2017 features
- How to document TypeScript
- The @typicalname tag
- Linking to external resources
- Param list format options
- Listing namepaths
- Troubleshooting