diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-10-31 18:16:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-31 18:16:27 +0100 |
commit | 39716183ac557610bf1e8c48b0663b2da1f570e7 (patch) | |
tree | bf693f02c46274cad5791102ef5012a4daa67ce4 /ext/fetch/lib.rs | |
parent | 646afdf259e9e25b59c5305aff231e131ea2fc52 (diff) |
feat(ext/web): EventSource (#14730)
Closes #10298
---------
Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
Diffstat (limited to 'ext/fetch/lib.rs')
-rw-r--r-- | ext/fetch/lib.rs | 12 |
1 files changed, 11 insertions, 1 deletions
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<FP>, op_fetch_send, op_fetch_response_upgrade, + op_utf8_to_byte_string, op_fetch_custom_client<FP>, ], 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<ByteString, AnyError> { + Ok(input.into()) +} |