pub struct HttpCallBuilder<'a> { /* private fields */ }
Expand description
Builder for HttpCall
.
Implementations§
Source§impl<'a> HttpCallBuilder<'a>
impl<'a> HttpCallBuilder<'a>
Sourcepub fn upstream<VALUE: Into<Upstream<'a>>>(self, value: VALUE) -> Self
pub fn upstream<VALUE: Into<Upstream<'a>>>(self, value: VALUE) -> Self
Upstream cluster to send the request to.
Sourcepub fn headers<VALUE: Into<Vec<(&'a str, &'a [u8])>>>(
self,
value: VALUE,
) -> Self
pub fn headers<VALUE: Into<Vec<(&'a str, &'a [u8])>>>( self, value: VALUE, ) -> Self
All headers to be sent along with the request. The proxy may add additional headers.
This should include pseudo headers like :method
and :path
.
Sourcepub fn header<VALUE>(self, item: VALUE) -> Self
pub fn header<VALUE>(self, item: VALUE) -> Self
All headers to be sent along with the request. The proxy may add additional headers.
This should include pseudo headers like :method
and :path
.
Sourcepub fn trailers<VALUE: Into<Vec<(&'a str, &'a [u8])>>>(
self,
value: VALUE,
) -> Self
pub fn trailers<VALUE: Into<Vec<(&'a str, &'a [u8])>>>( self, value: VALUE, ) -> Self
All trailers to be sent along with the request.
Sourcepub fn trailer<VALUE>(self, item: VALUE) -> Self
pub fn trailer<VALUE>(self, item: VALUE) -> Self
All trailers to be sent along with the request.
Sourcepub fn body<VALUE: Into<&'a [u8]>>(self, value: VALUE) -> Self
pub fn body<VALUE: Into<&'a [u8]>>(self, value: VALUE) -> Self
An optional request body to send with the request.
Source§impl<'a> HttpCallBuilder<'a>
impl<'a> HttpCallBuilder<'a>
Sourcepub fn callback<R: RootContext + 'static>(
self,
callback: impl FnOnce(&mut R, &HttpCallResponse) + 'static,
) -> Self
pub fn callback<R: RootContext + 'static>( self, callback: impl FnOnce(&mut R, &HttpCallResponse) + 'static, ) -> Self
Set a response callback
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for HttpCallBuilder<'a>
impl<'a> !RefUnwindSafe for HttpCallBuilder<'a>
impl<'a> !Send for HttpCallBuilder<'a>
impl<'a> !Sync for HttpCallBuilder<'a>
impl<'a> Unpin for HttpCallBuilder<'a>
impl<'a> !UnwindSafe for HttpCallBuilder<'a>
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