cvitool 1.0.748 → 1.0.749
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/build/src/hgo.js +3 -3
- package/package.json +1 -1
- package/src/hgo.ts +3 -3
package/build/src/hgo.js
CHANGED
|
@@ -49,7 +49,7 @@ function request(url, options) {
|
|
|
49
49
|
if (!isbodyEmpty) {
|
|
50
50
|
baseHeaders = {
|
|
51
51
|
'Content-Type': 'application/json; charset=utf-8',
|
|
52
|
-
'Content-
|
|
52
|
+
'Content-Length': Buffer.byteLength(data)
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
let res;
|
|
@@ -434,7 +434,7 @@ function getReqProtocolAndOpt(url, baseHeaders, headers, timeout, method, agent,
|
|
|
434
434
|
port: urlOpt.port,
|
|
435
435
|
path: `${urlOpt.pathname}${urlOpt.search}`,
|
|
436
436
|
timeout,
|
|
437
|
-
headers: Object.assign(
|
|
437
|
+
headers: Object.assign(baseHeaders, headers),
|
|
438
438
|
method,
|
|
439
439
|
agent
|
|
440
440
|
};
|
|
@@ -449,7 +449,7 @@ function getReqProtocolAndOpt(url, baseHeaders, headers, timeout, method, agent,
|
|
|
449
449
|
port: proxyUrlOpt.port,
|
|
450
450
|
path: url,
|
|
451
451
|
timeout,
|
|
452
|
-
headers: Object.assign(
|
|
452
|
+
headers: Object.assign(baseHeaders, headers, proxyHeaders),
|
|
453
453
|
method,
|
|
454
454
|
agent
|
|
455
455
|
};
|
package/package.json
CHANGED
package/src/hgo.ts
CHANGED
|
@@ -106,7 +106,7 @@ async function request(url: string, options?: reqOptions): Promise<ResData> {
|
|
|
106
106
|
if (!isbodyEmpty) {
|
|
107
107
|
baseHeaders = {
|
|
108
108
|
'Content-Type': 'application/json; charset=utf-8',
|
|
109
|
-
'Content-
|
|
109
|
+
'Content-Length': Buffer.byteLength(data)
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
let res: ResData;
|
|
@@ -482,7 +482,7 @@ function getReqProtocolAndOpt(url: string, baseHeaders: CustomObject, headers: C
|
|
|
482
482
|
port: urlOpt.port,
|
|
483
483
|
path: `${urlOpt.pathname}${urlOpt.search}`,
|
|
484
484
|
timeout,
|
|
485
|
-
headers: Object.assign(
|
|
485
|
+
headers: Object.assign(baseHeaders, headers),
|
|
486
486
|
method,
|
|
487
487
|
agent
|
|
488
488
|
};
|
|
@@ -497,7 +497,7 @@ function getReqProtocolAndOpt(url: string, baseHeaders: CustomObject, headers: C
|
|
|
497
497
|
port: proxyUrlOpt.port,
|
|
498
498
|
path: url,
|
|
499
499
|
timeout,
|
|
500
|
-
headers: Object.assign(
|
|
500
|
+
headers: Object.assign(baseHeaders, headers, proxyHeaders),
|
|
501
501
|
method,
|
|
502
502
|
agent
|
|
503
503
|
};
|