canvas-data-cli
Advanced tools
Comparing version 0.4.1 to 0.5.0
@@ -39,2 +39,9 @@ 'use strict'; | ||
this.apiSecret = config.secret; | ||
if (config.httpsProxy) { | ||
if (config.proxyUsername) { | ||
this.proxyUrl = 'https://' + config.proxyUsername + ':' + config.proxyPassword + '@' + config.httpsProxy; | ||
} else { | ||
this.proxyUrl = 'https://' + config.httpsProxy; | ||
} | ||
} | ||
} | ||
@@ -62,2 +69,5 @@ | ||
}; | ||
if (this.proxyUrl) { | ||
reqOpts.proxy = this.proxyUrl; | ||
} | ||
request(apiAuth.signRequest(this.apiKey, this.apiSecret, reqOpts), function (err, resp, body) { | ||
@@ -64,0 +74,0 @@ if (err) return cb; |
{ | ||
"name": "canvas-data-cli", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "A CLI tool for interacting with the Canvas Data API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -21,2 +21,13 @@ # Canvas Data CLI | ||
#### Configuring an HTTP Proxy | ||
canvas-data-cli has support for HTTP Proxies, both with and without basic authentication. To do this there | ||
are three extra options you can add to your config file. `httpsProxy`, `proxyUsername`, and `proxyPassword`. | ||
| Config Option | Value | | ||
|:--------------|:----------------------------------------------------------------------------------------| | ||
| httpsProxy | the `host:port` of the https proxy. Ideally it'd look like: `https_proxy_stuff.com:433` | | ||
| proxyUsername | the basic auth username for the https proxy. | | ||
| proxyPassword | the basic auth password for the https proxy. | | ||
## Usage | ||
@@ -23,0 +34,0 @@ |
66113
1456
108