summaryrefslogtreecommitdiff
path: root/ext/fetch/26_fetch.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fetch/26_fetch.js')
-rw-r--r--ext/fetch/26_fetch.js27
1 files changed, 17 insertions, 10 deletions
diff --git a/ext/fetch/26_fetch.js b/ext/fetch/26_fetch.js
index be7c48dda..7ef9bdaf7 100644
--- a/ext/fetch/26_fetch.js
+++ b/ext/fetch/26_fetch.js
@@ -67,8 +67,17 @@
* @param {Uint8Array | null} body
* @returns {{ requestRid: number, requestBodyRid: number | null }}
*/
- function opFetch(args, body) {
- return core.opSync("op_fetch", args, body);
+ function opFetch(method, url, headers, clientRid, hasBody, bodyLength, body) {
+ return core.opSync(
+ "op_fetch",
+ method,
+ url,
+ headers,
+ clientRid,
+ hasBody,
+ bodyLength,
+ body,
+ );
}
/**
@@ -210,14 +219,12 @@
}
const { requestRid, requestBodyRid, cancelHandleRid } = opFetch(
- {
- method: req.method,
- url: req.currentUrl(),
- headers: req.headerList,
- clientRid: req.clientRid,
- hasBody: reqBody !== null,
- bodyLength: req.body?.length,
- },
+ req.method,
+ req.currentUrl(),
+ req.headerList,
+ req.clientRid,
+ reqBody !== null,
+ req.body?.length,
ObjectPrototypeIsPrototypeOf(Uint8ArrayPrototype, reqBody)
? reqBody
: null,