pub struct CosClient { /* private fields */ }
Expand description
COS HTTP 客户端
Implementations§
Source§impl CosClient
impl CosClient
Sourcepub async fn get(
&self,
path: &str,
params: HashMap<String, String>,
) -> Result<Response>
pub async fn get( &self, path: &str, params: HashMap<String, String>, ) -> Result<Response>
发送 GET 请求
Sourcepub async fn put<T>(
&self,
path: &str,
params: HashMap<String, String>,
body: Option<T>,
) -> Result<Response>
pub async fn put<T>( &self, path: &str, params: HashMap<String, String>, body: Option<T>, ) -> Result<Response>
发送 PUT 请求
Sourcepub async fn post<T>(
&self,
path: &str,
params: HashMap<String, String>,
body: Option<T>,
) -> Result<Response>
pub async fn post<T>( &self, path: &str, params: HashMap<String, String>, body: Option<T>, ) -> Result<Response>
发送 POST 请求
Sourcepub async fn delete(
&self,
path: &str,
params: HashMap<String, String>,
) -> Result<Response>
pub async fn delete( &self, path: &str, params: HashMap<String, String>, ) -> Result<Response>
发送 DELETE 请求
Sourcepub async fn head(
&self,
path: &str,
params: HashMap<String, String>,
) -> Result<Response>
pub async fn head( &self, path: &str, params: HashMap<String, String>, ) -> Result<Response>
发送 HEAD 请求
Sourcepub async fn parse_xml_response(response: Response) -> Result<Value>
pub async fn parse_xml_response(response: Response) -> Result<Value>
解析 XML 响应
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CosClient
impl !RefUnwindSafe for CosClient
impl Send for CosClient
impl Sync for CosClient
impl Unpin for CosClient
impl !UnwindSafe for CosClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more