Struct proxy_sdk::HttpCallBuilder
source · 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> !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