pub struct HttpObserver { /* private fields */ }Available on crate feature
std only.Expand description
GET a URL and treat the body as observation (JSON if possible, else raw text).
Requires network. Only public HTTP(S) targets are allowed. Requests have a 5-second total timeout, a 2-second connect timeout, and a 1 MiB body limit by default. Redirects are revalidated individually.
Implementations§
Source§impl HttpObserver
impl HttpObserver
Sourcepub fn connect_timeout(self, d: Duration) -> Self
pub fn connect_timeout(self, d: Duration) -> Self
Performs connect timeout for this type.
Sourcepub fn max_response_bytes(self, max: usize) -> Self
pub fn max_response_bytes(self, max: usize) -> Self
Performs maximum response bytes for this type.
Trait Implementations§
Source§impl Observer for HttpObserver
Available on crate feature ureq only.
impl Observer for HttpObserver
Available on crate feature
ureq only.Auto Trait Implementations§
impl Forget for HttpObserver
impl Freeze for HttpObserver
impl Move for HttpObserver
impl RefUnwindSafe for HttpObserver
impl Send for HttpObserverwhere
RawVecInner: Send,
impl Sync for HttpObserverwhere
RawVecInner: Sync,
impl Unpin for HttpObserver
impl UnsafeUnpin for HttpObserver
impl UnwindSafe for HttpObserverwhere
RawVecInner: UnwindSafe,
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