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

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

A trait for providing the necessary information for a single REST API endpoint.

Required Methods

The HTTP method to use for the endpoint.

The path to the endpoint.

Provided Methods

Query parameters for the endpoint.

The body for the endpoint.

Returns the Content-Encoding header for the data as well as the data itself.

Implementors