From edeccef4990598620bf5595df6fc8c1b1b1a7f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 7 Oct 2023 17:34:03 +0200 Subject: refactor: migrate more ops to op2 macro (#20808) Getting closer... --- ext/node/ops/http.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'ext/node/ops') diff --git a/ext/node/ops/http.rs b/ext/node/ops/http.rs index 2a4d31f50..40ef6df32 100644 --- a/ext/node/ops/http.rs +++ b/ext/node/ops/http.rs @@ -2,7 +2,7 @@ use deno_core::error::type_error; use deno_core::error::AnyError; -use deno_core::op; +use deno_core::op2; use deno_core::url::Url; use deno_core::AsyncRefCell; use deno_core::ByteString; @@ -23,13 +23,14 @@ use reqwest::header::CONTENT_LENGTH; use reqwest::Body; use reqwest::Method; -#[op] +#[op2] +#[serde] pub fn op_node_http_request

( state: &mut OpState, - method: ByteString, - url: String, - headers: Vec<(ByteString, ByteString)>, - client_rid: Option, + #[serde] method: ByteString, + #[string] url: String, + #[serde] headers: Vec<(ByteString, ByteString)>, + #[smi] client_rid: Option, has_body: bool, ) -> Result where -- cgit v1.2.3