Struct conjure_runtime::RequestBuilder [−][src]
A builder for an asynchronous HTTP request.
Implementations
impl<'a, T> RequestBuilder<'a, T>[src]
pub fn headers_mut(&mut self) -> &mut HeaderMap[src]
Returns a mutable reference to the headers of this request.
The following headers are set by default, but can be overridden:
Accept-Encoding: gzip, deflateAccept: */*User-Agent: <provided at Client construction>
The following headers are fully controlled by conjure_runtime, which will overwrite any existing value.
ConnectionContent-LengthContent-TypeHostProxy-AuthorizationX-B3-FlagsX-B3-ParentSpanIdX-B3-SampledX-B3-SpanIdX-B3-TraceId
pub fn bearer_token(self, token: &BearerToken) -> Self[src]
Sets the Authorization request header to a bearer token.
This is a simple convenience wrapper.
pub fn param<U>(self, name: &str, value: U) -> Self where
U: ToString, [src]
U: ToString,
Adds a parameter.
Parameters which match names in the path pattern will be treated as path parameters, and other parameters will be treated as query parameters. Only one instance of path parameters may be provided, but multiple instances of query parameters may be provided.
pub fn idempotent(self, idempotent: bool) -> Self[src]
Sets the idempotency of the request.
Idempotent requests can be retried if an IO error is encountered.
The default value is controlled by the Idempotency enum.
pub fn body<U>(self, body: U) -> Self where
U: Body + Sync + Send + 'a, [src]
U: Body + Sync + Send + 'a,
Sets the request body.
impl<'a, T, B> RequestBuilder<'a, T> where
T: Service<Request<RawBody>, Response = Response<B>> + 'static + Sync + Send,
T::Error: Into<Box<dyn Error + Sync + Send>>,
T::Future: Send,
B: Body<Data = Bytes> + Send,
B::Error: Into<Box<dyn Error + Sync + Send>>, [src]
T: Service<Request<RawBody>, Response = Response<B>> + 'static + Sync + Send,
T::Error: Into<Box<dyn Error + Sync + Send>>,
T::Future: Send,
B: Body<Data = Bytes> + Send,
B::Error: Into<Box<dyn Error + Sync + Send>>,
Auto Trait Implementations
impl<'a, T = DefaultRawClient> !RefUnwindSafe for RequestBuilder<'a, T>
impl<'a, T> Send for RequestBuilder<'a, T> where
T: Send + Sync,
T: Send + Sync,
impl<'a, T> Sync for RequestBuilder<'a, T> where
T: Send + Sync,
T: Send + Sync,
impl<'a, T> Unpin for RequestBuilder<'a, T>
impl<'a, T = DefaultRawClient> !UnwindSafe for RequestBuilder<'a, T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,