pub struct RouteAwareClientPool { /* private fields */ }Expand description
Reuses transport clients by resolved route while selecting a route for every request URL.
Request creation stays on the pool so the URL used for PAC or system-proxy resolution cannot differ from the URL that is sent. Redirects are followed through the pool as new requests, so each hop gets its own route decision while connections are still reused by route.
Implementations§
Source§impl RouteAwareClientPool
impl RouteAwareClientPool
pub fn outbound_proxy_policy(&self) -> OutboundProxyPolicy
Sourcepub fn new(
http_client_factory: HttpClientFactory,
route_class: ClientRouteClass,
) -> Self
pub fn new( http_client_factory: HttpClientFactory, route_class: ClientRouteClass, ) -> Self
Creates a pool with the shared default HTTP transport settings.
Sourcepub fn new_without_request_logging(
http_client_factory: HttpClientFactory,
route_class: ClientRouteClass,
) -> Self
pub fn new_without_request_logging( http_client_factory: HttpClientFactory, route_class: ClientRouteClass, ) -> Self
Creates a pool with the shared defaults but without URL or response-header diagnostics.
Creates a pool that retains the Cloudflare cookies required by ChatGPT endpoints.
Creates a ChatGPT Cloudflare-cookie pool without URL or response-header diagnostics.
pub fn get<U>(&self, url: U) -> RouteAwareRequestBuilderwhere
U: IntoUrl,
pub fn post<U>(&self, url: U) -> RouteAwareRequestBuilderwhere
U: IntoUrl,
pub fn put<U>(&self, url: U) -> RouteAwareRequestBuilderwhere
U: IntoUrl,
pub fn delete<U>(&self, url: U) -> RouteAwareRequestBuilderwhere
U: IntoUrl,
pub fn request<U>(&self, method: Method, url: U) -> RouteAwareRequestBuilderwhere
U: IntoUrl,
Trait Implementations§
Source§impl Clone for RouteAwareClientPool
impl Clone for RouteAwareClientPool
Source§fn clone(&self) -> RouteAwareClientPool
fn clone(&self) -> RouteAwareClientPool
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 !RefUnwindSafe for RouteAwareClientPool
impl !UnwindSafe for RouteAwareClientPool
impl Freeze for RouteAwareClientPool
impl Send for RouteAwareClientPool
impl Sync for RouteAwareClientPool
impl Unpin for RouteAwareClientPool
impl UnsafeUnpin for RouteAwareClientPool
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