Skip to main content

HttpClient

Trait HttpClient 

Source
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§

Source

fn post(&self, url: &str, body: &str) -> LogResult<()>

Source

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".

Implementors§