summaryrefslogtreecommitdiff
path: root/ext/fetch/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fetch/lib.rs')
-rw-r--r--ext/fetch/lib.rs12
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())
+}