pub trait EndpointHandler: Sync + Send {
    fn handle_request(
        &self,
        req: &Request,
        kicker: &dyn Fn(ApiRequest) -> ApiResponse
    ) -> HttpResult; }
Expand description

Trait for HTTP endpoints to handle HTTP requests.

Required Methods

Handles an HTTP request.

The main responsibilities of the handlers includes:

  • parse and validate incoming request message
  • send the request to subscriber
  • wait response from the subscriber
  • generate HTTP result

Implementors