pub trait HttpClient: Send + Sync {
// Required methods
fn request<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = SdkResult<HttpResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set_auth_token(&mut self, token: String);
fn auth_token(&self) -> Option<String>;
}Expand description
HTTP client trait
Platform-specific implementations must implement this trait.
Required Methods§
Sourcefn request<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = SdkResult<HttpResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = SdkResult<HttpResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send an HTTP request
Sourcefn set_auth_token(&mut self, token: String)
fn set_auth_token(&mut self, token: String)
Set default authorization token
Sourcefn auth_token(&self) -> Option<String>
fn auth_token(&self) -> Option<String>
Get current auth token