pub struct HttpTargetBuilder { /* private fields */ }Expand description
Builder for HTTP targets
Implementations§
Source§impl HttpTargetBuilder
impl HttpTargetBuilder
Sourcepub fn headers(
self,
headers: impl IntoIterator<Item = (String, String)>,
) -> Self
pub fn headers( self, headers: impl IntoIterator<Item = (String, String)>, ) -> Self
Add multiple headers
Sourcepub fn auth_bearer(self, token: impl AsRef<str>) -> Self
pub fn auth_bearer(self, token: impl AsRef<str>) -> Self
Set authorization header with Bearer token
Sourcepub fn content_type(self, content_type: impl Into<String>) -> Self
pub fn content_type(self, content_type: impl Into<String>) -> Self
Set content type header
Sourcepub fn user_agent(self, user_agent: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
Set user agent header
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpTargetBuilder
impl RefUnwindSafe for HttpTargetBuilder
impl Send for HttpTargetBuilder
impl Sync for HttpTargetBuilder
impl Unpin for HttpTargetBuilder
impl UnwindSafe for HttpTargetBuilder
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