Skip to content

Commit

Permalink
Update main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooninghnk authored Jun 4, 2024
1 parent 4bec70e commit 57c640e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct Args {
count: u8,
}

#[tokio::main]
fn main() {
let args = Args::parse();

Expand All @@ -34,13 +35,12 @@ fn main() {
}
}
}
#[tokio::main]

async fn get_req(url: &str) -> Result<String, reqwest::Error> {
let body = reqwest::get(url).await?.text().await?;
Ok(body)
}

#[tokio::main]
async fn get_post(url: &str, json: String) {
let spl: Vec<&str> = json.split(":").collect();
let json_data = format!(r#"{{"{}": "{}"}}"#, spl[0], spl[1]);
Expand Down

0 comments on commit 57c640e

Please sign in to comment.