pub trait HttpClient {
// Required methods
fn post(&self, url: &str, body: &str) -> LogResult<()>;
fn post_with_token(
&self,
url: &str,
body: &str,
token: Option<&str>,
) -> LogResult<()>;
}Expand description
HTTP 客户端 trait
Required Methods§
fn post(&self, url: &str, body: &str) -> LogResult<()>
fn post_with_token( &self, url: &str, body: &str, token: Option<&str>, ) -> LogResult<()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".