I'm trying to learn a bit of Java's HTTP server, I have a simple setup, on a PHP server I have an input field where I upload a File with POST. I was wondering if it is possible to get that file in the Java server.
My current setup is the most simple one, on my main I have:
HttpServer server = HttpServer.create(new InetSocketAddress(8000), 0);
server.createContext("/test", new MyHandler());
server.start();
I can't find anything showing what to do from here on to get the File, I tried looking through everything given by HttpExchange.
I know that I can send a POST request but i don't know how to listen to one or even if it is possible to get the file from it.