pub struct HttpRequest {
pub url: String,
pub timeout: Option<Duration>,
pub follow_redirects: bool,
pub max_redirects: u32,
pub max_response_bytes: u64,
}Expand description
An HTTP fetch request.
Currently GET-only — the fetch tool’s schema also exposes only read semantics, not
method / header / body / auth.
Fields§
§url: StringAbsolute http:// / https:// URL. Other schemes are rejected early by the fetch
tool layer.
timeout: Option<Duration>Per-request total timeout; None lets the backend use the stack-level default.
follow_redirects: boolWhether to follow 3xx Location redirects. When false, treat 3xx responses as
terminal.
max_redirects: u32Maximum number of redirect hops to follow; ignored when follow_redirects is
false.
max_response_bytes: u64Maximum accumulated body size; if exceeded the body is truncated and
HttpResponse::truncated is set to true.
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 (const: unstable) · 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