diff --git a/Cargo.toml b/Cargo.toml index 56de612..ee5bc04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,3 +11,6 @@ tracing-subscriber = "0.3" serde = { version = "1.0", features=["derive", "default"] } serde_json = "1.0" + +reqwest = "0.11" +tokio = { version = "1.29", features=["macros", "rt", "default", "tracing", "rt-multi-thread"] } diff --git a/src/main.rs b/src/main.rs index 52e3222..cd09c34 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,12 +8,22 @@ use tracing_subscriber::Registry; use appmap_tracing_test::appmap_definition::*; use appmap_tracing_test::*; +use reqwest; -pub fn main() -> Result<(), Box> { +#[tokio::main] +pub async fn main() -> Result<(), Box> { init_tracing(); sample_json()?; test_sub_mod(); + test_reqwest(true).await?; + Ok(()) +} + +#[instrument] +async fn test_reqwest(test_param: bool) -> Result<(), Box> { + let result = reqwest::get("http://google.com").await?; + println!("result: {:?}", result); Ok(()) }