summaryrefslogtreecommitdiff
path: root/op_crates/fetch/26_fetch.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-04-12 21:55:05 +0200
committerGitHub <noreply@github.com>2021-04-12 15:55:05 -0400
commit46b1c653c0c433932908b7610f60b409af134c76 (patch)
tree00d8b59c8c4e9b90538d548ebd828d2b3f94d4fd /op_crates/fetch/26_fetch.js
parenta20504642d083172f297543f9788b128e9c2e0bc (diff)
refactor(deno): remove concept of bin & json ops (#10145)
Diffstat (limited to 'op_crates/fetch/26_fetch.js')
-rw-r--r--op_crates/fetch/26_fetch.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/op_crates/fetch/26_fetch.js b/op_crates/fetch/26_fetch.js
index 0fd825e16..8dc7c2056 100644
--- a/op_crates/fetch/26_fetch.js
+++ b/op_crates/fetch/26_fetch.js
@@ -859,7 +859,7 @@
* @returns {HttpClient}
*/
function createHttpClient(options) {
- return new HttpClient(core.jsonOpSync("op_create_http_client", options));
+ return new HttpClient(core.opSync("op_create_http_client", options));
}
class HttpClient {
@@ -884,7 +884,7 @@
if (body != null) {
zeroCopy = new Uint8Array(body.buffer, body.byteOffset, body.byteLength);
}
- return core.jsonOpSync("op_fetch", args, zeroCopy);
+ return core.opSync("op_fetch", args, zeroCopy);
}
/**
@@ -892,7 +892,7 @@
* @returns {Promise<{status: number, statusText: string, headers: Record<string,string[]>, url: string, responseRid: number}>}
*/
function opFetchSend(rid) {
- return core.jsonOpAsync("op_fetch_send", rid);
+ return core.opAsync("op_fetch_send", rid);
}
/**
@@ -906,7 +906,7 @@
body.byteOffset,
body.byteLength,
);
- return core.jsonOpAsync("op_fetch_request_write", rid, zeroCopy);
+ return core.opAsync("op_fetch_request_write", rid, zeroCopy);
}
const NULL_BODY_STATUS = [101, 204, 205, 304];
@@ -1400,7 +1400,7 @@
async pull(controller) {
try {
const chunk = new Uint8Array(16 * 1024 + 256);
- const read = await core.jsonOpAsync(
+ const read = await core.opAsync(
"op_fetch_response_read",
rid,
chunk,