Skip to content

Commit

Permalink
fix: fix http plugin fetch init with connectTimeout. (#858)
Browse files Browse the repository at this point in the history
  • Loading branch information
hygkui authored Dec 28, 2023
1 parent e80626c commit 1a34720
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/http-init-fetch-option-connectTimeout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"http-js": minor
---

Fix http fetch client option init with parameter `connectTimeout`
2 changes: 1 addition & 1 deletion plugins/http/guest-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export async function fetch(
init?: RequestInit & ClientOptions,
): Promise<Response> {
const maxRedirections = init?.maxRedirections;
const connectTimeout = init?.maxRedirections;
const connectTimeout = init?.connectTimeout;
const proxy = init?.proxy;

// Remove these fields before creating the request
Expand Down
2 changes: 1 addition & 1 deletion plugins/http/src/api-iife.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a34720

Please sign in to comment.