pub struct OutboundRequest {
pub method: Method,
pub url: String,
pub headers: Vec<(String, String)>,
pub body: Bytes,
pub timeout: Duration,
pub ssl_verify: bool,
pub tls: Option<Arc<UpstreamTls>>,
}Expand description
A single outbound request. timeout’s meaning depends on which call
consumes it: [Client::request] applies it to the whole call — connect,
request write, and response body collection. [Client::request_streaming]
applies it only to connect, request write, and response headers; once
headers are in, the body is unbounded here and left to the caller’s own
idle bound (e.g. stream_idle_timeout_ms on the upstream node).
Fields§
§method: Method§url: String§headers: Vec<(String, String)>Header name/value pairs; names may repeat for multi-value headers.
body: Bytes§timeout: DurationDeadline — see the struct-level doc for what it covers, which differs
between request and request_streaming. Callers should default to
3s for callouts.
ssl_verify: boolWhen false, TLS certificate verification is disabled (matching
APISIX’s ssl_verify: false). Ignored for plain-http URLs and when
tls is set (the identity carries its own verify flag).
tls: Option<Arc<UpstreamTls>>Per-upstream TLS identity (client cert / private CA). None uses the
shared verified/insecure clients — today’s behavior.
Implementations§
Auto Trait Implementations§
impl !Freeze for OutboundRequest
impl RefUnwindSafe for OutboundRequest
impl Send for OutboundRequest
impl Sync for OutboundRequest
impl Unpin for OutboundRequest
impl UnsafeUnpin for OutboundRequest
impl UnwindSafe for OutboundRequest
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more