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

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,12 +253,11 @@ 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, {
257
- method: requestConfig.method,
256
+ const request = new Request(url, _object_spread_props(_object_spread({}, requestConfig), {
258
257
  headers,
259
258
  body,
260
259
  signal: controller.signal
261
- });
260
+ }));
262
261
  const fetchResponse = yield fetch(request);
263
262
  // 清除超时定时器
264
263
  if (timeoutId) {
@@ -364,12 +363,11 @@ export class FetchClient {
364
363
  // 准备请求(标记为流式请求)
365
364
  const { url, headers, body, requestConfig, controller } = _this.prepareRequest(config, true);
366
365
  // 发送请求
367
- const request = new Request(url, {
368
- method: requestConfig.method || 'GET',
366
+ const request = new Request(url, _object_spread_props(_object_spread({}, requestConfig), {
369
367
  headers,
370
368
  body,
371
369
  signal: controller.signal
372
- });
370
+ }));
373
371
  try {
374
372
  var // 触发 onStart 回调
375
373
  _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.2",
3
+ "version": "0.0.1-beta.3",
4
4
  "description": "",
5
5
  "main": "./dist/index.ts.js",
6
6
  "scripts": {