Struct txtai::api::API [−][src]
pub struct API { /* fields omitted */ }
Base API definition
Implementations
impl API
[src]
impl API
[src]Base API implementation
pub fn new(url: &str) -> API
[src]
pub async fn get(&self, method: &str, params: &[(&str, &str)]) -> APIResponse
[src]
Executes a GET request. Returns Response.
Arguments
method
- API methodparams
- List of (name, value) tuples to use as query parameters
pub async fn post(&self, method: &str, json: &Value) -> APIResponse
[src]
Executes a POST request. Returns Response.
Arguments
method
- API methodjson
- Value object with post body
Auto Trait Implementations
impl RefUnwindSafe for API
impl RefUnwindSafe for API
impl UnwindSafe for API
impl UnwindSafe for API
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<T> Instrument for T
[src]
impl<T> Instrument for T
[src]