pub struct Client { /* private fields */ }
Expand description
A networking client for ffsend actions.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(config: ClientConfig, transfer: bool) -> Self
pub fn new(config: ClientConfig, transfer: bool) -> Self
Construct the ffsend client with the given config
.
If this client is used for transfering files, transfer
should be true.
Sourcepub fn get<U: IntoUrl>(&self, url: U) -> ReqwestRequestBuilder
pub fn get<U: IntoUrl>(&self, url: U) -> ReqwestRequestBuilder
Create a HTTP GET request through this client, returning a RequestBuilder
.
Sourcepub fn post<U: IntoUrl>(&self, url: U) -> ReqwestRequestBuilder
pub fn post<U: IntoUrl>(&self, url: U) -> ReqwestRequestBuilder
Create a HTTP GET request through this client, returning a RequestBuilder
.
Sourcepub fn execute(&self, request: ReqwestRequest) -> Result<ReqwestResponse>
pub fn execute(&self, request: ReqwestRequest) -> Result<ReqwestResponse>
Execute the given reqwest request through the internal reqwest client.
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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