.config - rchipka/node-osmosis GitHub Wiki
The .config
command sets configuration options for the preceding command.
// set a proxy for `get`
osmosis
.get('example.com')
.config('proxy', 'localhost:8080')
If there is no preceding command, then the configuration options will be globally shared across all osmosis instances.
// set a global proxy option
osmosis
.config('proxy', 'localhost:8080')
Getting the current configuration options
osmosis
...
.then(function() {
console.log("opts: ", this.config())
})
Options
concurrency
- Number of simultaneous requests to make (default: 5)follow
- Number of redirects to follow (default: 3)headers
- Custom request headersignore_http_errors
- Parse 404, etc. responseskeep_data
- Store the raw response data inDocument.response.data
proxy
- Proxy string or array of proxy stringstimeout
- Request timeout in milliseconds (default: 30 seconds)tries
- Number of times to retry a failed request (default: 3)user_agent
- A user agent string