pub fn post<T: DeserializeOwned>(url: &str, body: Value) -> Result<T, Error>Expand description
Submit to a resource.
let created: Value = simple::http::post(
"https://api.example.com/leads",
json!({ "email": "lead@example.com" }),
)?;
assert_eq!(created["id"], json!("L2"));