Skip to content

Commit 844ae68

Browse files
committed
Added support for to override fetch init options in the Browser (#3895).
1 parent 945ec6b commit 844ae68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src.ts/utils/geturl-browser.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ export function createGetUrl(options?: Record<string, any>): FetchGetUrlFunc {
3636
});
3737
}
3838

39-
const init = {
39+
const init = Object.assign({ }, options, {
4040
method: req.method,
4141
headers: new Headers(Array.from(req)),
4242
body: req.body || undefined,
4343
signal: controller.signal
44-
};
44+
});
4545

4646
let resp: Awaited<ReturnType<typeof fetch>>;
4747
try {

0 commit comments

Comments
 (0)