pub struct ClientOptions {
pub base_url: Option<String>,
pub user_agent: Option<String>,
pub default_headers: Vec<(String, String)>,
pub caching_behavior: CachingBehavior,
pub use_default_proxy: bool,
pub use_cookies: bool,
pub follow_redirects: bool,
pub max_response_buffer_size: Option<u64>,
pub request_timeout: Option<Duration>,
}
Expand description
Configuration options for creating a nyquest HTTP client.
Fields§
§base_url: Option<String>
Optional base URL prepended to all request URLs.
user_agent: Option<String>
Optional User-Agent header value to use for all requests.
default_headers: Vec<(String, String)>
Headers to include in all requests by default.
caching_behavior: CachingBehavior
Controls the caching behavior for HTTP responses.
use_default_proxy: bool
Whether to use the system’s default proxy settings.
Whether to enable cookie handling.
follow_redirects: bool
Whether to automatically follow redirect responses.
max_response_buffer_size: Option<u64>
Optional maximum buffer size for response bodies.
request_timeout: Option<Duration>
Optional timeout duration for requests.
Trait Implementations§
Source§impl Clone for ClientOptions
impl Clone for ClientOptions
Source§fn clone(&self) -> ClientOptions
fn clone(&self) -> ClientOptions
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ClientOptions
impl Debug for ClientOptions
Auto Trait Implementations§
impl Freeze for ClientOptions
impl RefUnwindSafe for ClientOptions
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl UnwindSafe for ClientOptions
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