kontroller/src/lib.rs

10 lines
249 B
Rust
Raw Normal View History

2023-11-11 15:22:24 +01:00
use reqwest::Client;
use serde::ser::Serialize;
2023-12-05 17:08:10 +01:00
use tokio;
2023-11-11 15:22:24 +01:00
#[tokio::main]
pub async fn post<T: Serialize>(addr: &String, form_a: &str, form_b: T) {
let c = Client::new();
2023-12-05 17:08:10 +01:00
let p = [(form_a, form_b)];
2023-11-11 15:22:24 +01:00
c.post(addr).form(&p).send().await;
2023-12-05 17:08:10 +01:00
}