pub struct GuardedHttp { /* private fields */ }Expand description
HTTP client that only reaches allowed addresses, public unicast by default. Each hop’s host is resolved, every address checked and the connection pinned to a checked address; GET redirects are re-checked and a cross-origin hop drops all request headers. The body is read eagerly inside the time and size limits. No proxy is used.
Implementations§
Source§impl GuardedHttp
impl GuardedHttp
Sourcepub fn new(limits: HttpLimits) -> Self
pub fn new(limits: HttpLimits) -> Self
Builds a client that reaches public unicast addresses only.
Returns the client with limits applied to every request.
Trait Implementations§
Source§impl Clone for GuardedHttp
impl Clone for GuardedHttp
Source§impl Debug for GuardedHttp
impl Debug for GuardedHttp
Source§impl Transport for GuardedHttp
impl Transport for GuardedHttp
Auto Trait Implementations§
impl Forget for GuardedHttp
impl Freeze for GuardedHttp
impl Move for GuardedHttp
impl RefUnwindSafe for GuardedHttp
impl Send for GuardedHttp
impl Sync for GuardedHttp
impl Unpin for GuardedHttp
impl UnsafeUnpin for GuardedHttp
impl UnwindSafe for GuardedHttp
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