diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-09-16 22:22:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 22:22:43 +0200 |
commit | 6c4da0e429eb47dae6a220c5576a39f137615bb8 (patch) | |
tree | a8715428caea00105acc9a10fcd0f356085d3fa7 /cli/rt/26_fetch.js | |
parent | 104aebdfb5d01f7482bacef6d58c2ce16da44334 (diff) |
refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521)
Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync
Diffstat (limited to 'cli/rt/26_fetch.js')
-rw-r--r-- | cli/rt/26_fetch.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/rt/26_fetch.js b/cli/rt/26_fetch.js index 9e34aa8d8..1c1d8c78f 100644 --- a/cli/rt/26_fetch.js +++ b/cli/rt/26_fetch.js @@ -1,12 +1,12 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. ((window) => { + const core = window.Deno.core; const { notImplemented } = window.__bootstrap.util; const { getHeaderValueParams, isTypedArray } = window.__bootstrap.webUtil; const { Blob, bytesSymbol: blobBytesSymbol } = window.__bootstrap.blob; const { read } = window.__bootstrap.io; const { close } = window.__bootstrap.resources; - const { sendSync, sendAsync } = window.__bootstrap.dispatchJson; const Body = window.__bootstrap.body; const { ReadableStream } = window.__bootstrap.streams; const { MultipartBuilder } = window.__bootstrap.multipart; @@ -17,7 +17,7 @@ } function opCreateHttpClient(args) { - return sendSync("op_create_http_client", args); + return core.jsonOpSync("op_create_http_client", args); } class HttpClient { @@ -35,7 +35,7 @@ zeroCopy = new Uint8Array(body.buffer, body.byteOffset, body.byteLength); } - return sendAsync("op_fetch", args, ...(zeroCopy ? [zeroCopy] : [])); + return core.jsonOpAsync("op_fetch", args, ...(zeroCopy ? [zeroCopy] : [])); } const NULL_BODY_STATUS = [101, 204, 205, 304]; |