[−][src]Struct bdrck::http::client::Client
Client is the standard, non-testing implementation of AbstractClient. If debug assersions are enabled, then this structure also provides a mechanism for recording an HTTP session.
Methods
impl Client
[src]
pub fn new() -> Self
[src]
Initialize a new client.
pub fn new_with_recording<P: AsRef<Path>>(recording_output: P) -> Self
[src]
Initialize a new client, which will record its HTTP session and write the result to the given path once it is destructed.
Trait Implementations
impl AbstractClient for Client
[src]
fn execute(&self, request: Request) -> Result<(ResponseMetadata, Vec<u8>)>
[src]
fn get(&self, url: Url) -> RequestBuilder
[src]
fn post(&self, url: Url) -> RequestBuilder
[src]
fn put(&self, url: Url) -> RequestBuilder
[src]
fn patch(&self, url: Url) -> RequestBuilder
[src]
fn delete(&self, url: Url) -> RequestBuilder
[src]
fn head(&self, url: Url) -> RequestBuilder
[src]
fn sleep(&self, sleep: fn(_: Duration), duration: Duration)
[src]
fn execute_with_retries(
&self,
max_retries: usize,
add_jitter: bool,
method: Method,
url: Url,
headers: Option<&HeaderMap>,
body: Option<&[u8]>
) -> Result<(ResponseMetadata, Vec<u8>)>
[src]
&self,
max_retries: usize,
add_jitter: bool,
method: Method,
url: Url,
headers: Option<&HeaderMap>,
body: Option<&[u8]>
) -> Result<(ResponseMetadata, Vec<u8>)>
fn execute_with_retries_custom_sleep(
&self,
sleep: fn(_: Duration),
max_retries: usize,
add_jitter: bool,
method: Method,
url: Url,
headers: Option<&HeaderMap>,
body: Option<&[u8]>
) -> Result<(ResponseMetadata, Vec<u8>)>
[src]
&self,
sleep: fn(_: Duration),
max_retries: usize,
add_jitter: bool,
method: Method,
url: Url,
headers: Option<&HeaderMap>,
body: Option<&[u8]>
) -> Result<(ResponseMetadata, Vec<u8>)>
impl Drop for Client
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,