pub trait ClientHandler {
// Required methods
fn get_url(&self, url: &str) -> Response ⓘ;
fn post_json(&self, url: &str, json: &HashMap<&str, &str>) -> Response ⓘ;
fn post_body(&self, url: &str, body: &str) -> Response ⓘ;
fn put_xml(&self, url: &str, body: &str) -> Response ⓘ;
fn put_text(&self, url: &str, text: &str) -> Response ⓘ;
}Required Methods§
fn get_url(&self, url: &str) -> Response ⓘ
fn post_json(&self, url: &str, json: &HashMap<&str, &str>) -> Response ⓘ
fn post_body(&self, url: &str, body: &str) -> Response ⓘ
fn put_xml(&self, url: &str, body: &str) -> Response ⓘ
fn put_text(&self, url: &str, text: &str) -> Response ⓘ
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ClientHandler for Client
impl ClientHandler for Client
Source§fn post_json(&self, url: &str, json: &HashMap<&str, &str>) -> Response ⓘ
fn post_json(&self, url: &str, json: &HashMap<&str, &str>) -> Response ⓘ
Perform a POST request to send JSON and stores its result
§Args:
url - the suffix of the URL
json - the json data to send
Source§fn post_body(&self, url: &str, body: &str) -> Response ⓘ
fn post_body(&self, url: &str, body: &str) -> Response ⓘ
Perform a POST request to send a raw body and stores its result
§Args:
url - the suffix of the URL
body - the body data to send (String format)