Package io.muserver.rest
Class RestHandler
- java.lang.Object
-
- io.muserver.rest.RestHandler
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhandle(MuRequest muRequest, MuResponse muResponse)Called when an HTTP request is made (unless a previous handler stopped handler processing)
-
-
-
Method Detail
-
handle
public boolean handle(MuRequest muRequest, MuResponse muResponse) throws java.lang.Exception
Description copied from interface:MuHandlerCalled when an HTTP request is made (unless a previous handler stopped handler processing)- Specified by:
handlein interfaceMuHandler- Parameters:
muRequest- The HTTP request.muResponse- The HTTP response.- Returns:
- Return
falseto continue processing the next handler (for example if writing a filter or inspector); ortrueto stop processing (normally done if this handler sent a response). - Throws:
java.lang.Exception- Any uncaught exceptions will result in a 500 error code being returned to the client with a simple message.
-
-