Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ var Capi = require("qcloudapi-sdk");
var capi = new Capi({
SecretId: "Your SecretId here",
SecretKey: "Your SecretKey here",
serviceType: "account"
serviceType: "account",
// proxy: 'proxy address'
});

capi.request(
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var baseHost = 'api.qcloud.com'
* @param {String} defaults.SecretId secretId
* @param {String} defaults.SecretKey secretKey
* @param {String} defaults.signatureMethod 签名方法,默认sha1
* @param {String} defaults.proxy 代理地址
* @constructor
*/
var QcloudApi = function(defaults) {
Expand Down Expand Up @@ -171,6 +172,7 @@ QcloudApi.prototype.request = function(data, opts, callback, extra) {

assign(option, extra)

option.proxy = this.defaults.proxy
request(option, function(error, response, body) {
/**
* `.request` 的请求回调
Expand Down