pub struct RequestBuilder<'a, E> { /* private fields */ }Expand description
A builder for a request to be sent to the upstream.
Implementations§
Source§impl<'a, E> RequestBuilder<'a, E>where
E: ResponseExtractor + 'static,
E::Output: 'static,
impl<'a, E> RequestBuilder<'a, E>where
E: ResponseExtractor + 'static,
E::Output: 'static,
Sourcepub fn extractor<T>(self, extractor: T) -> RequestBuilder<'a, T>where
T: ResponseExtractor,
pub fn extractor<T>(self, extractor: T) -> RequestBuilder<'a, T>where
T: ResponseExtractor,
Sets the extractor to be used to extract only the necessary data from Response.
Sourcepub fn extract_with<F, T>(
self,
function: F,
) -> RequestBuilder<'a, FnResponseExtractor<F>>
pub fn extract_with<F, T>( self, function: F, ) -> RequestBuilder<'a, FnResponseExtractor<F>>
Sets the extractor to be used to extract only the necessary data from Response.
Sourcepub fn headers(self, headers: Vec<(&'a str, &'a str)>) -> Self
pub fn headers(self, headers: Vec<(&'a str, &'a str)>) -> Self
Sets the headers to be used in the request.
Trait Implementations§
Source§impl<E: ResponseExtractor> ResponseExtractor for RequestBuilder<'_, E>
impl<E: ResponseExtractor> ResponseExtractor for RequestBuilder<'_, E>
Source§type Output = <E as ResponseExtractor>::Output
type Output = <E as ResponseExtractor>::Output
The output type
Source§fn extract(
self,
event: &HttpCallResponse,
buffers: &dyn ResponseBuffers,
) -> Self::Output
fn extract( self, event: &HttpCallResponse, buffers: &dyn ResponseBuffers, ) -> Self::Output
Extracts the Response from their low-level components
Auto Trait Implementations§
impl<'a, E> Freeze for RequestBuilder<'a, E>where
E: Freeze,
impl<'a, E> !RefUnwindSafe for RequestBuilder<'a, E>
impl<'a, E> !Send for RequestBuilder<'a, E>
impl<'a, E> !Sync for RequestBuilder<'a, E>
impl<'a, E> Unpin for RequestBuilder<'a, E>where
E: Unpin,
impl<'a, E> !UnwindSafe for RequestBuilder<'a, E>
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