Interface Handler

All Known Implementing Classes:
DelegatingHandler

public interface Handler
Handler for requests.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable IntoResponse
    handle(org.microhttp.Request request)
    Handles the request.
  • Method Details

    • handle

      @Nullable IntoResponse handle(org.microhttp.Request request) throws Exception
      Handles the request.

      If null is returned, that means that the handler is signaling that it does not want to handle the Request. This would signal that another Handler should be consulted or a default response should be used

      Parameters:
      request - The request to handle.
      Returns:
      Something which can be converted into a response or null.
      Throws:
      Exception - If something goes wrong.