pub struct HttpClient { /* private fields */ }Expand description
HTTP client for CDN requests
Implementations§
Source§impl HttpClient
impl HttpClient
Sourcepub fn new(endpoint: CdnEndpoint, config: ClientConfig) -> Result<Self>
pub fn new(endpoint: CdnEndpoint, config: ClientConfig) -> Result<Self>
Create a new HTTP client
Sourcepub async fn fetch_range(
&self,
path: &str,
range: RangeRequest,
) -> Result<Bytes>
pub async fn fetch_range( &self, path: &str, range: RangeRequest, ) -> Result<Bytes>
Fetch a range of bytes
Auto Trait Implementations§
impl Freeze for HttpClient
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe 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