Endpoint

Trait Endpoint 

Source
pub trait Endpoint {
    // Required methods
    fn method(&self) -> Method;
    fn endpoint(&self) -> Cow<'static, str>;

    // Provided methods
    fn parameters(&self) -> QueryParams<'_> { ... }
    fn body(&self) -> Result<Option<(&'static str, Vec<u8>)>, BodyError> { ... }
}

Required Methods§

Source

fn method(&self) -> Method

HTTP Method to hit the endpoint with

Source

fn endpoint(&self) -> Cow<'static, str>

Path to endpoint

Provided Methods§

Source

fn parameters(&self) -> QueryParams<'_>

Parameters to hit the endpoint with

Source

fn body(&self) -> Result<Option<(&'static str, Vec<u8>)>, BodyError>

Body to hit the endpoint with

Implementors§