Trait elastic_reqwest::ElasticClient
[−]
[src]
pub trait ElasticClient { fn elastic_req<I, B>(
&self,
params: &RequestParams,
req: I
) -> Result<Response, Error>
where
I: Into<HttpRequest<'static, B>>,
B: IntoReqwestBody; }
Represents a client that can send Elasticsearch requests.
Required Methods
fn elastic_req<I, B>(
&self,
params: &RequestParams,
req: I
) -> Result<Response, Error> where
I: Into<HttpRequest<'static, B>>,
B: IntoReqwestBody,
&self,
params: &RequestParams,
req: I
) -> Result<Response, Error> where
I: Into<HttpRequest<'static, B>>,
B: IntoReqwestBody,
Send a request and get a response.
Examples
Bring the ElasticClient
trait into scope and call elastic_req
with any type that
can be converted into a req::HttpRequest
.
This method returns a raw reqwest::Response
.
use elastic_reqwest::ElasticClient; let (client, params) = elastic_reqwest::default().unwrap(); let http_res = client.elastic_req(¶ms, request).unwrap();
Implementors
impl ElasticClient for Client