extern crate reqwest;
use reqwest::header;
fn main() -> Result<(), Box> {
let mut headers = header::HeaderMap::new();
headers.insert("Content-Type", "application/json".parse().unwrap());
headers.insert("x-tggl-api-key", "API_KEY".parse().unwrap());
let client = reqwest::blocking::Client::new();
let res = client.post("https://api.tggl.io/flags")
.headers(headers)
.body("{\"userId\":\"foo\",\"email\":\"foo@gmail.com\"}")
.send()?
.text()?;
println!("{}", res);
Ok(())
}
Empower product and marketing teams to experiment within safe boundaries set by your engineering team.
Your app is instantly updated when a flag is updated, no need to write code and deploy the new version.