diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-04-23 22:19:06 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-23 22:19:06 +0530 |
commit | 2eb8c3b82fd54027c35c87ccc94797e34e2e95fd (patch) | |
tree | e63eb40e9fb5c6c818c08b36a5b79feed9fb0b9e /ext/fetch/26_fetch.js | |
parent | d2c80aa26f30cfc3d614ff313a8dfe4c2c534cd1 (diff) |
chore(ext/fetch): custom arity (#14198)
Diffstat (limited to 'ext/fetch/26_fetch.js')
-rw-r--r-- | ext/fetch/26_fetch.js | 27 |
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, |