pub struct HttpClient { /* private fields */ }Implementations§
Source§impl HttpClient
impl HttpClient
pub fn builder() -> HttpClientBuilder
pub fn get_client(&self) -> &Client
pub fn into_inner(self) -> Client
Source§impl HttpClient
impl HttpClient
Sourcepub async fn send_file(
&self,
url: &str,
method: Method,
headers: HeaderMap,
stream: ByteStream,
) -> Result<BaseResponse, Error>
pub async fn send_file( &self, url: &str, method: Method, headers: HeaderMap, stream: ByteStream, ) -> Result<BaseResponse, Error>
This method support only files which is smaller than 512MB, otherwise, will return error. If you are trying to upload a file that is more than 512MB, please use multipart upload which is supported by ucloud (Which should create multiple slices to upload).
Trait Implementations§
Source§impl Clone for HttpClient
impl Clone for HttpClient
Source§fn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for HttpClient
impl !UnwindSafe for HttpClient
impl Freeze for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl UnsafeUnpin for HttpClient
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