The server URI

Report a typo

What is the URI address of the registered resource?

InetAddress localAddress = InetAddress.getByName("127.0.1.10");
HttpServer server = HttpServer.create(new InetSocketAddress(localAddress, 8000), 0);

HttpContext context = server.createContext("/user", new MyNewHttpHandler());

Don't forget that your address must start with http://.

Enter a short text
___

Create a free account to access the full topic