(agent: &ureq::Agent, url: &str)
| 435 | } |
| 436 | |
| 437 | pub(crate) fn post_json(agent: &ureq::Agent, url: &str) -> (u16, Value) { |
| 438 | let response = crate::common::http_call_with_retry(&format!("POST {url}"), || { |
| 439 | agent.post(url).send_empty() |
| 440 | }); |
| 441 | response_to_json(response) |
| 442 | } |
| 443 | |
| 444 | pub(crate) fn post_json_body(agent: &ureq::Agent, url: &str, body: &Value) -> (u16, Value) { |
| 445 | let response = crate::common::http_call_with_retry(&format!("POST {url} (with body)"), || { |