@cpzxrobot/sdk 1.3.5 → 1.3.7

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.
@@ -40,6 +40,8 @@ class WebPlatform {
40
40
  const headers = new Headers(init === null || init === void 0 ? void 0 : init.headers);
41
41
  headers.set('Authorization', this.token);
42
42
  headers.set('Miniapp-Code', (_a = this.appCode) !== null && _a !== void 0 ? _a : "");
43
+ headers.set('Accept', 'text/event-stream');
44
+ headers.set('Cache-Control', 'no-cache');
43
45
  const response = await fetch(this.baseURL + input.toString(), Object.assign(Object.assign({}, init), { headers }));
44
46
  var reader = response.body.getReader();
45
47
  const decoder = new TextDecoder("utf-8");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/web_platform.ts CHANGED
@@ -46,6 +46,8 @@ export class WebPlatform implements PlatformInterface {
46
46
  const headers = new Headers(init?.headers);
47
47
  headers.set('Authorization', this.token);
48
48
  headers.set('Miniapp-Code', this.appCode ?? "");
49
+ headers.set('Accept', 'text/event-stream');
50
+ headers.set('Cache-Control', 'no-cache');
49
51
  const response = await fetch(this.baseURL + input.toString(), {
50
52
  ...init,
51
53
  headers