pub trait HTTPClient {
// Required method
fn send_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, T>(
&'life0 self,
method: &'life1 str,
endpoint: &'life2 str,
params: &'life3 [(&'life4 str, &'life5 str)],
body: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(T, Value), Error>> + Send + 'async_trait>>
where T: DeserializeOwned + Debug + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait;
}Expand description
Interface for any compatible HTTP client
Required Methods§
Sourcefn send_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, T>(
&'life0 self,
method: &'life1 str,
endpoint: &'life2 str,
params: &'life3 [(&'life4 str, &'life5 str)],
body: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(T, Value), Error>> + Send + 'async_trait>>where
T: DeserializeOwned + Debug + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn send_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, T>(
&'life0 self,
method: &'life1 str,
endpoint: &'life2 str,
params: &'life3 [(&'life4 str, &'life5 str)],
body: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<(T, Value), Error>> + Send + 'async_trait>>where
T: DeserializeOwned + Debug + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Send a request using the underlying HTTP client
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.