@cpzxrobot/sdk 1.2.89 → 1.2.90
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/dist/index.js +1 -0
- package/index.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -112,6 +112,7 @@ class Cpzxrobot {
|
|
|
112
112
|
const streamWithAuth = async (input, init, fn) => {
|
|
113
113
|
const headers = new Headers(init === null || init === void 0 ? void 0 : init.headers);
|
|
114
114
|
headers.set('Authorization', this.token);
|
|
115
|
+
headers.set('Miniapp-Code', this.appCode);
|
|
115
116
|
const response = await fetch(baseURL + input.toString(), Object.assign(Object.assign({}, init), { headers }));
|
|
116
117
|
var reader = response.body.getReader();
|
|
117
118
|
const decoder = new TextDecoder("utf-8");
|
package/index.ts
CHANGED
|
@@ -133,6 +133,7 @@ export class Cpzxrobot {
|
|
|
133
133
|
const streamWithAuth = async (input: RequestInfo, init?: RequestInit, fn?: Function) => {
|
|
134
134
|
const headers = new Headers(init?.headers);
|
|
135
135
|
headers.set('Authorization', this.token);
|
|
136
|
+
headers.set('Miniapp-Code', this.appCode);
|
|
136
137
|
const response = await fetch(baseURL + input.toString(), {
|
|
137
138
|
...init,
|
|
138
139
|
headers
|