-
Notifications
You must be signed in to change notification settings - Fork 247
.config
Robbie Chipka edited this page Dec 23, 2015
·
1 revision
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')
osmosis
...
.then(function() {
console.log("opts: ", this.config())
})
-
concurrency
- Number of simultaneous requests to make (default: 5) -
follow
- Number of redirects to follow (default: 3) -
headers
- Custom request headers -
ignore_http_errors
- Parse 404, etc. responses -
keep_data
- Store the raw response data inDocument.response.data
-
proxy
- Proxy string or array of proxy strings -
timeout
- Request timeout in milliseconds (default: 30 seconds) -
tries
- Number of times to retry a failed request (default: 3) -
user_agent
- A user agent string