Package fi.iki.elonen

Class HelloServer


  • public class HelloServer
    extends NanoHTTPD
    An example of subclassing NanoHTTPD to make a custom HTTP server.
    • Field Detail

      • LOG

        private static final java.util.logging.Logger LOG
        logger to log to.
    • Constructor Detail

      • HelloServer

        public HelloServer()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • serve

        public NanoHTTPD.Response serve​(NanoHTTPD.IHTTPSession session)
        Description copied from class: NanoHTTPD
        Override this to customize the server.

        (By default, this returns a 404 "Not Found" plain text error response.)

        Overrides:
        serve in class NanoHTTPD
        Parameters:
        session - The HTTP session
        Returns:
        HTTP response, see class Response for details