From 39716183ac557610bf1e8c48b0663b2da1f570e7 Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Tue, 31 Oct 2023 18:16:27 +0100 Subject: feat(ext/web): EventSource (#14730) Closes #10298 --------- Co-authored-by: Aapo Alasuutari --- ext/fetch/lib.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'ext/fetch/lib.rs') diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs index 589e6ebd8..797c5e2cd 100644 --- a/ext/fetch/lib.rs +++ b/ext/fetch/lib.rs @@ -112,6 +112,7 @@ deno_core::extension!(deno_fetch, op_fetch, op_fetch_send, op_fetch_response_upgrade, + op_utf8_to_byte_string, op_fetch_custom_client, ], esm = [ @@ -121,7 +122,8 @@ deno_core::extension!(deno_fetch, "22_http_client.js", "23_request.js", "23_response.js", - "26_fetch.js" + "26_fetch.js", + "27_eventsource.js" ], options = { options: Options, @@ -969,3 +971,11 @@ pub fn create_http_client( builder.build().map_err(|e| e.into()) } + +#[op2] +#[serde] +pub fn op_utf8_to_byte_string( + #[string] input: String, +) -> Result { + Ok(input.into()) +} -- cgit v1.2.3