Struct conjure_runtime::blocking::Client [−][src]
pub struct Client<T = DefaultRawClient>(_);
A blocking HTTP client to a remote service.
It implements the Conjure Client trait, but also offers a “raw” request interface for use with services that don’t
provide Conjure service definitions.
Implementations
impl<T> Client<T>[src]
impl<T> Client<T>[src]pub fn request(
&self,
method: Method,
pattern: &'static str
) -> RequestBuilder<'_, T>[src]
&self,
method: Method,
pattern: &'static str
) -> RequestBuilder<'_, T>
Returns a new request builder.
The pattern argument is a template for the request path. The param method on the builder is used to fill
in the parameters in the pattern with dynamic values.
pub fn get(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]
Returns a new builder for a GET request.
pub fn post(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]
Returns a new builder for a POST request.
pub fn put(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]
Returns a new builder for a PUT request.
pub fn delete(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]
Returns a new builder for a DELETE request.
pub fn patch(&self, pattern: &'static str) -> RequestBuilder<'_, T>[src]
Returns a new builder for a PATCH request.
Trait Implementations
impl<T, B> Client for Client<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<T, B> Client for Client<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]type BinaryWriter = BodyWriter
The client’s binary request body writer type.
type BinaryBody = ResponseBody<B>
The client’s binary response body type.
fn request<'a, R, U>(
&self,
method: Method,
path: &'static str,
path_params: PathParams,
query_params: QueryParams,
headers: HeaderMap<HeaderValue>,
body: R,
response_visitor: U
) -> Result<<U as VisitResponse<Self::BinaryBody>>::Output, Error> where
R: RequestBody<'a, Self::BinaryWriter>,
U: VisitResponse<Self::BinaryBody>, [src]
&self,
method: Method,
path: &'static str,
path_params: PathParams,
query_params: QueryParams,
headers: HeaderMap<HeaderValue>,
body: R,
response_visitor: U
) -> Result<<U as VisitResponse<Self::BinaryBody>>::Output, Error> where
R: RequestBody<'a, Self::BinaryWriter>,
U: VisitResponse<Self::BinaryBody>,
Auto Trait Implementations
impl<T = DefaultRawClient> !RefUnwindSafe for Client<T>
impl<T = DefaultRawClient> !RefUnwindSafe for Client<T>impl<T = DefaultRawClient> !UnwindSafe for Client<T>
impl<T = DefaultRawClient> !UnwindSafe for Client<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>,