Package io.muserver

Interface RouteHandler

    • Method Detail

      • handle

        void handle​(MuRequest request,
                    MuResponse response,
                    java.util.Map<java.lang.String,​java.lang.String> pathParams)
             throws java.lang.Exception
        Called when a request matches the given route
        Parameters:
        request - The request
        response - The response
        pathParams - A map of path parameters, for example id would equal "123" if the route URI template was /things/{id : [0-9]+} and the requested URI was /things/123
        Throws:
        java.lang.Exception - Throwing an exception will result in a 500 error code being returned.