Interface HTTPServer.UriResponder
- All Known Implementing Classes:
BaseHandler, ChangeHandler, CustomResponseHandler, DefaultAddHandler, DefaultDeleteHandler, DefaultEditHandler, DefaultIndexHandler, DefaultRESTIndexHandler, DefaultViewHandler, Error404Handler, ErrorHandler, ExampleDownloadHandler, ExampleUploadHandler, ExtUsersAddHandler, ExtUsersDeleteHandler, ExtUsersEditHandler, ExtUsersIndexHandler, ExtUsersViewHandler, HomeHandler, HTTPServer.DefaultHandler, HTTPServer.DefaultStreamHandler, HTTPServer.Error404UriHandler, HTTPServer.GeneralHandler, HTTPServer.IndexHandler, HTTPServer.NotImplementedHandler, HTTPServer.StaticPageHandler, LogHandler, LoginHandler, LogoutHandler, NewQRCodeHandler, NoConfigHandler, NoContent204Handler, NoContentAndConfigHandler, NoContentButRouteHandler, NoContentHandler, NotImplementedHandler, OtpHandler, PropertiesAddHandler, PropertiesDeleteHandler, PropertiesEditHandler, PropertiesIndexHandler, PropertiesViewHandler, ResetHandler, RolesAddHandler, RolesDeleteHandler, RolesEditHandler, RolesIndexHandler, RolesViewHandler, SettingsHandler, TasksAddHandler, TasksDeleteHandler, TasksEditHandler, TasksIndexHandler, TasksRESTIndexHandler, TasksViewHandler, UsersAddHandler, UsersDeleteHandler, UsersEditHandler, UsersIndexHandler, UsersViewHandler
- Enclosing class:
HTTPServer
public static interface HTTPServer.UriResponder
Responder for a routed URI. The router invokes the method that matches
the HTTP method of the request.
-
Method Summary
Modifier and TypeMethodDescriptionorg.nanohttpd.protocols.http.response.Responsedelete(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP DELETE request.org.nanohttpd.protocols.http.response.Responseget(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP GET request.org.nanohttpd.protocols.http.response.Responseother(String method, HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles any other HTTP method.org.nanohttpd.protocols.http.response.Responsepost(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP POST request.org.nanohttpd.protocols.http.response.Responseput(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP PUT request.
-
Method Details
-
get
org.nanohttpd.protocols.http.response.Response get(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP GET request.- Parameters:
uriResource- the route that matched the requesturlParams- the parameters extracted from the URIsession- the HTTP session- Returns:
- the response
-
put
org.nanohttpd.protocols.http.response.Response put(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP PUT request.- Parameters:
uriResource- the route that matched the requesturlParams- the parameters extracted from the URIsession- the HTTP session- Returns:
- the response
-
post
org.nanohttpd.protocols.http.response.Response post(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP POST request.- Parameters:
uriResource- the route that matched the requesturlParams- the parameters extracted from the URIsession- the HTTP session- Returns:
- the response
-
delete
org.nanohttpd.protocols.http.response.Response delete(HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles an HTTP DELETE request.- Parameters:
uriResource- the route that matched the requesturlParams- the parameters extracted from the URIsession- the HTTP session- Returns:
- the response
-
other
org.nanohttpd.protocols.http.response.Response other(String method, HTTPServer.UriResource uriResource, Map<String, String> urlParams, org.nanohttpd.protocols.http.IHTTPSession session) Handles any other HTTP method.- Parameters:
method- the HTTP method nameuriResource- the route that matched the requesturlParams- the parameters extracted from the URIsession- the HTTP session- Returns:
- the response
-