diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-01-10 20:54:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-10 20:54:29 +0100 |
commit | 1a6ce29f3d11e5f0d0d022914e3f9fbcfa487294 (patch) | |
tree | 9e1940a9a7a7392e6818341eea67becfa26ebbfa /runtime/ops/fetch.rs | |
parent | 2c1f74402c00a2975cdaf9199b6487e5fd8175ba (diff) |
feat(fetch): req streaming + 0-copy resp streaming (#9036)
* feat(fetch): req streaming + 0-copy resp streaming
* lint
* lint
* fix test
* rm test.js
* explicitly use CancelHandle::default()
* Apply review suggestions
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
* fix test
* Merge remote-tracking branch 'origin/master' into fetch_real_streaming
* fix test
* retrigger ci
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'runtime/ops/fetch.rs')
-rw-r--r-- | runtime/ops/fetch.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/runtime/ops/fetch.rs b/runtime/ops/fetch.rs index c2f62d8ee..62aaf7a18 100644 --- a/runtime/ops/fetch.rs +++ b/runtime/ops/fetch.rs @@ -15,8 +15,18 @@ pub fn init( http_util::create_http_client(user_agent, ca_data).unwrap() }); } - super::reg_json_async(rt, "op_fetch", deno_fetch::op_fetch::<Permissions>); - super::reg_json_async(rt, "op_fetch_read", deno_fetch::op_fetch_read); + super::reg_json_sync(rt, "op_fetch", deno_fetch::op_fetch::<Permissions>); + super::reg_json_async(rt, "op_fetch_send", deno_fetch::op_fetch_send); + super::reg_json_async( + rt, + "op_fetch_request_write", + deno_fetch::op_fetch_request_write, + ); + super::reg_json_async( + rt, + "op_fetch_response_read", + deno_fetch::op_fetch_response_read, + ); super::reg_json_sync( rt, "op_create_http_client", |