pub trait Endpoint {
    type QueryParams: Serialize;
    type RequestBody: Serialize;
    type ResponseBody: DeserializeOwned + Debug;

    fn path(&self) -> Cow<'_, str>;

    fn headers(&self) -> HttpRequestHeaders { ... }
    fn query(&self) -> Option<Self::QueryParams> { ... }
    fn request_body(&self) -> Option<Self::RequestBody> { ... }
    fn request_method(&self) -> Method { ... }
    fn request_strategy(&self) -> RequestStrategy { ... }
    fn auth_strategy(&self) -> AuthStrategy { ... }
    fn request_url(&self, environment: Environment) -> Url { ... }
}

Required Associated Types§

The query parameters the endpoint accepts.

The request body the endpoint accepts.

The response body the endpoint returns.

Required Methods§

The path of the endpoint. Not including the base URL.

Provided Methods§

The headers to send with the request.

The query parameters to send with the request.

The request body to send with the request.

The HTTP method to use for the request.

The request strategy to use.

The authorization strategy to use.

The URL to send the request to. DO NOT OVERRIDE THIS METHOD.

Implementors§