pub struct HttpRequest {
pub method: String,
pub url: String,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
pub timeout_ms: u64,
pub max_response_size: u64,
pub decompress: bool,
pub transport_policy: Option<Arc<HttpTransportPolicy>>,
pub redirect_guard: Option<Arc<dyn RedirectGuard>>,
pub recorded_as: Option<RecordedRequest>,
}Fields§
§method: StringUpper-cased.
url: StringAbsolute URL, query string included.
headers: Vec<(String, String)>Names as the guest supplied them; lookups downstream are case-insensitive.
body: Vec<u8>§timeout_ms: u64§max_response_size: u64HttpError::TooLarge if exceeded.
decompress: boolhttp.download-only: opt-in transparent decompression via Content-Encoding or URL suffix.
transport_policy: Option<Arc<HttpTransportPolicy>>Custom transports must enforce this on the initial URL and every redirect.
redirect_guard: Option<Arc<dyn RedirectGuard>>Capability rules for redirect hops, attached after the auth proxy runs. Custom transports must consult it before sending every redirect hop; the initial URL is already authorized.
recorded_as: Option<RecordedRequest>What the call log recorded for the program’s own request, before the auth proxy
changed it. Set only for a client that asks (HttpClient::wants_recorded_request),
and by the host functions alone: an auth proxy that builds a new request instead
of changing this one drops it.