summaryrefslogtreecommitdiff
path: root/runtime/js/40_http.js
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/js/40_http.js')
-rw-r--r--runtime/js/40_http.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/js/40_http.js b/runtime/js/40_http.js
index d9dff7b52..4a2dcdf4a 100644
--- a/runtime/js/40_http.js
+++ b/runtime/js/40_http.js
@@ -10,7 +10,7 @@
const { ReadableStream } = window.__bootstrap.streams;
function serveHttp(conn) {
- const rid = Deno.core.jsonOpSync("op_http_start", conn.rid);
+ const rid = Deno.core.opSync("op_http_start", conn.rid);
return new HttpConn(rid);
}
@@ -30,7 +30,7 @@
async nextRequest() {
let nextRequest;
try {
- nextRequest = await Deno.core.jsonOpAsync(
+ nextRequest = await Deno.core.opAsync(
"op_http_request_next",
this.#rid,
);
@@ -88,7 +88,7 @@
}
function readRequest(requestRid, zeroCopyBuf) {
- return Deno.core.jsonOpAsync(
+ return Deno.core.opAsync(
"op_http_request_read",
requestRid,
zeroCopyBuf,
@@ -129,7 +129,7 @@
zeroCopyBuf = null;
}
- const responseBodyRid = Deno.core.jsonOpSync("op_http_response", [
+ const responseBodyRid = Deno.core.opSync("op_http_response", [
responseSenderRid,
resp.status ?? 200,
flattenHeaders(resp.headers),
@@ -149,7 +149,7 @@
chunk.byteOffset,
chunk.byteLength,
);
- await Deno.core.jsonOpAsync(
+ await Deno.core.opAsync(
"op_http_response_write",
responseBodyRid,
data,
@@ -158,7 +158,7 @@
// Once all chunks are sent, and the request body is closed, we can close
// the response body.
- await Deno.core.jsonOpAsync("op_http_response_close", responseBodyRid);
+ await Deno.core.opAsync("op_http_response_close", responseBodyRid);
}
};
}