pub struct HttpPushSender { /* private fields */ }Expand description
HTTP-based PushSender using hyper.
Retries up to 3 times with exponential backoff on transient HTTP errors.
§Security
- Rejects webhook URLs targeting private/loopback/link-local addresses to prevent SSRF attacks.
- Validates authentication credentials to prevent HTTP header injection (rejects values containing CR/LF characters).
Implementations§
Source§impl HttpPushSender
impl HttpPushSender
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new HttpPushSender with the default 30-second request timeout.
Sourcepub fn with_timeout(request_timeout: Duration) -> Self
pub fn with_timeout(request_timeout: Duration) -> Self
Creates a new HttpPushSender with a custom per-request timeout.
Sourcepub const fn allow_private_urls(self) -> Self
pub const fn allow_private_urls(self) -> Self
Creates an HttpPushSender that allows private/loopback URLs.
Warning: This disables SSRF protection and should only be used in testing or trusted environments.
Trait Implementations§
Source§impl Debug for HttpPushSender
impl Debug for HttpPushSender
Source§impl Default for HttpPushSender
impl Default for HttpPushSender
Source§impl PushSender for HttpPushSender
impl PushSender for HttpPushSender
Auto Trait Implementations§
impl Freeze for HttpPushSender
impl !RefUnwindSafe for HttpPushSender
impl Send for HttpPushSender
impl Sync for HttpPushSender
impl Unpin for HttpPushSender
impl UnsafeUnpin for HttpPushSender
impl !UnwindSafe for HttpPushSender
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