pub struct RequestOptions {
pub headers: HashMap<String, String>,
pub cookies: HashMap<String, String>,
pub query: HashMap<String, String>,
}Expand description
Options for customizing an HTTP request.
Includes optional headers, cookies, and query parameters.
Fields§
§headers: HashMap<String, String>Custom HTTP headers to send with the request.
Key-value pairs representing cookies.
query: HashMap<String, String>Query string parameters to include in the URL.
Implementations§
Source§impl RequestOptions
impl RequestOptions
Sourcepub fn new(
headers: Option<HashMap<String, String>>,
cookies: Option<HashMap<String, String>>,
query: Option<HashMap<String, String>>,
) -> Self
pub fn new( headers: Option<HashMap<String, String>>, cookies: Option<HashMap<String, String>>, query: Option<HashMap<String, String>>, ) -> Self
Creates a new RequestOptions instance from optional headers, cookies, and query params.
§Arguments
headers- Optional map of header names to values.cookies- Optional map of cookie names to values.query- Optional map of query parameter names to values.
Trait Implementations§
Source§impl Clone for RequestOptions
impl Clone for RequestOptions
Source§fn clone(&self) -> RequestOptions
fn clone(&self) -> RequestOptions
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 moreSource§impl Debug for RequestOptions
impl Debug for RequestOptions
Source§impl Default for RequestOptions
impl Default for RequestOptions
Source§fn default() -> RequestOptions
fn default() -> RequestOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RequestOptions
impl RefUnwindSafe for RequestOptions
impl Send for RequestOptions
impl Sync for RequestOptions
impl Unpin for RequestOptions
impl UnsafeUnpin for RequestOptions
impl UnwindSafe for RequestOptions
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