tencentcloud-sdk-nodejs-chdfs 4.0.463 → 4.0.469

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,6 +51,7 @@ const client = new CvmClient({
51
51
  httpProfile: {
52
52
  reqMethod: "POST", // 请求方法
53
53
  reqTimeout: 30, // 请求超时时间,默认60s
54
+ // proxy: "http://127.0.0.1:8899" // http请求代理
54
55
  },
55
56
  },
56
57
  })
@@ -90,6 +91,7 @@ const client = new CvmClient({
90
91
  httpProfile: {
91
92
  reqMethod: "POST", // 请求方法
92
93
  reqTimeout: 30, // 请求超时时间,默认60s
94
+ // proxy: "http://127.0.0.1:8899" // http请求代理
93
95
  },
94
96
  },
95
97
  })
@@ -114,14 +116,14 @@ async function main(){
114
116
 
115
117
  ## 代理
116
118
 
117
- 如果是有代理的环境下,需要设置系统环境变量 `http_proxy` ,否则可能无法正常调用,抛出连接超时的异常。
119
+ 如果是有代理的环境下,需要配置代理,请在创建Client时传入 [profile.httpProfile.proxy](https://github.com/TencentCloud/tencentcloud-sdk-nodejs/blob/master/src/common/interface.ts#L78) 参数,或设置系统环境变量 `http_proxy` ,否则可能无法正常调用,抛出连接超时的异常。
118
120
 
119
121
  # 旧版 SDK
120
122
 
121
123
  我们推荐使用新版 NODEJS SDK,如果一定要用旧版 SDK,请前往[github 仓库](https://github.com/CFETeam/qcloudapi-sdk)下载。
122
124
 
123
125
  # 常见问题
124
- - webpack打包出错
126
+ - webpack打包出错/浏览器报错
125
127
 
126
128
  请**务必不要**将此sdk直接用于web前端(包括小程序等),暴露密钥在这些环境非常不安全。
127
129
 
@@ -129,7 +131,7 @@ async function main(){
129
131
 
130
132
  - `The "original" argument must be of type Function.`
131
133
 
132
- 通常是因为nodejs版本低于 `v10` ,请再次确认执行环境。
134
+ 通常是因为nodejs版本低于 `v10` ,或处于非node环境,请再次确认执行环境。
133
135
 
134
136
  - 请求不通
135
137
 
@@ -142,7 +144,7 @@ async function main(){
142
144
  # windows powershell
143
145
  $env:NODE_DEBUG='http' ; node app.js
144
146
  ```
145
- 如需要配置代理,请设置环境变量 `http_proxy`,例如:
147
+ 如需要配置代理,请查阅 [代理](#代理),或设置环境变量 `http_proxy`,例如:
146
148
  ```sh
147
149
  # MacOS
148
150
  http_proxy=http://代理地址:代理端口 node app.js