Struct conjure_runtime::blocking::RequestBuilder [−][src]
pub struct RequestBuilder<'a, T = DefaultRawClient> { /* fields omitted */ }
A builder for a blocking HTTP request.
Implementations
impl<'a, T> RequestBuilder<'a, T>[src]
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 + 'a, [src]
U: Body + '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> + 'static + Send,
B::Error: Into<Box<dyn Error + Sync + Send>>, [src]
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> + 'static + Send,
B::Error: Into<Box<dyn Error + Sync + Send>>, [src]Auto Trait Implementations
impl<'a, T = DefaultRawClient> !RefUnwindSafe for RequestBuilder<'a, T>
impl<'a, T = DefaultRawClient> !RefUnwindSafe for RequestBuilder<'a, T>impl<'a, T = DefaultRawClient> !Send for RequestBuilder<'a, T>
impl<'a, T = DefaultRawClient> !Send for RequestBuilder<'a, T>impl<'a, T = DefaultRawClient> !Sync for RequestBuilder<'a, T>
impl<'a, T = DefaultRawClient> !Sync for RequestBuilder<'a, T>impl<'a, T> Unpin for RequestBuilder<'a, T>
impl<'a, T> Unpin for RequestBuilder<'a, T>impl<'a, T = DefaultRawClient> !UnwindSafe for RequestBuilder<'a, T>
impl<'a, T = DefaultRawClient> !UnwindSafe for RequestBuilder<'a, T>Blanket Implementations
impl<T> Instrument 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<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,