@blueking/chat-helper 0.0.1-beta.3 → 0.0.1-beta.4

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.
@@ -253,11 +253,14 @@ export class FetchClient {
253
253
  const timeoutId = requestConfig.timeout && requestConfig.timeout > 0 ? setTimeout(()=>controller.abort(), requestConfig.timeout) : undefined;
254
254
  try {
255
255
  // 发送请求
256
- const request = new Request(url, _object_spread_props(_object_spread({}, requestConfig), {
256
+ const request = new Request(url, {
257
+ method: requestConfig.method,
258
+ credentials: requestConfig.credentials,
259
+ mode: requestConfig.mode,
257
260
  headers,
258
261
  body,
259
262
  signal: controller.signal
260
- }));
263
+ });
261
264
  const fetchResponse = yield fetch(request);
262
265
  // 清除超时定时器
263
266
  if (timeoutId) {
@@ -363,11 +366,14 @@ export class FetchClient {
363
366
  // 准备请求(标记为流式请求)
364
367
  const { url, headers, body, requestConfig, controller } = _this.prepareRequest(config, true);
365
368
  // 发送请求
366
- const request = new Request(url, _object_spread_props(_object_spread({}, requestConfig), {
369
+ const request = new Request(url, {
370
+ method: requestConfig.method,
371
+ credentials: requestConfig.credentials,
372
+ mode: requestConfig.mode,
367
373
  headers,
368
374
  body,
369
375
  signal: controller.signal
370
- }));
376
+ });
371
377
  try {
372
378
  var // 触发 onStart 回调
373
379
  _config_onStart, _fetchResponse_body;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/chat-helper",
3
- "version": "0.0.1-beta.3",
3
+ "version": "0.0.1-beta.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.ts.js",
6
6
  "scripts": {