From 8476bbff9af28408bc6a9b0a7b2303cb3803422e Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Thu, 12 Sep 2024 10:46:48 +1000 Subject: feat: stabilize `Deno.createHttpClient()` (#25569) Closes #25518 --- runtime/js/90_deno_ns.js | 2 ++ runtime/lib.rs | 2 +- runtime/ops/http.rs | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime') diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js index f2de16627..51b00fa02 100644 --- a/runtime/js/90_deno_ns.js +++ b/runtime/js/90_deno_ns.js @@ -126,6 +126,8 @@ const denoNs = { uid: os.uid, Command: process.Command, ChildProcess: process.ChildProcess, + httpClient: httpClient.httpClient, + createHttpClient: httpClient.createHttpClient, }; // NOTE(bartlomieju): keep IDs in sync with `cli/main.rs` diff --git a/runtime/lib.rs b/runtime/lib.rs index c8ab099f1..ed3f9fbc6 100644 --- a/runtime/lib.rs +++ b/runtime/lib.rs @@ -83,7 +83,7 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[UnstableGranularFlag] = &[ UnstableGranularFlag { name: ops::http::UNSTABLE_FEATURE_NAME, help_text: "Enable unstable HTTP APIs", - show_in_help: true, + show_in_help: false, id: 5, }, UnstableGranularFlag { diff --git a/runtime/ops/http.rs b/runtime/ops/http.rs index cde2d5858..a195a759e 100644 --- a/runtime/ops/http.rs +++ b/runtime/ops/http.rs @@ -57,8 +57,6 @@ fn op_http_start( .resource_table .take::(tcp_stream_rid) { - super::check_unstable(state, UNSTABLE_FEATURE_NAME, "Deno.serveHttp"); - // This UNIX socket might be used somewhere else. If it's the case, we cannot proceed with the // process of starting a HTTP server on top of this UNIX socket, so we just return a bad // resource error. See also: https://github.com/denoland/deno/pull/16242 -- cgit v1.2.3