pub struct HttpRequest {
pub method: Method,
pub path: String,
pub query: Vec<(String, String)>,
pub headers: HeaderMap,
pub body: HttpRequestBody,
pub request_timeout: Option<Duration>,
pub cancellation_token: Option<CancellationToken>,
pub retry_override: HttpRequestRetryOverride,
}Expand description
Immutable snapshot of a single HTTP call produced by crate::HttpRequestBuilder.
Fields§
§method: MethodHTTP method (GET, POST, …).
path: StringAbsolute URL string, or path joined with client base_url when not parseable as URL.
query: Vec<(String, String)>Query string parameters as (name, value) pairs.
headers: HeaderMapHeaders added on top of client defaults and injector output.
body: HttpRequestBodySerialized body variant.
request_timeout: Option<Duration>Overrides client-wide request timeout when set; otherwise client default applies.
cancellation_token: Option<CancellationToken>Optional cancellation token checked before send and during I/O phases.
retry_override: HttpRequestRetryOverridePer-request retry override (enable/disable/method-policy/Retry-After behavior).
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a duplicate 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 moreAuto Trait Implementations§
impl !Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnsafeUnpin for HttpRequest
impl UnwindSafe for HttpRequest
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