HTTP POST Request (HttpURLConnection)
I'm trying to program a channel changer for my Dreambox with java. The Dreambox is a tv streamer that also have a web interface. You can change channel by entering:
in any web browser.
This is the behaviour im trying to duplicate but without a browser and in a java application. I've figured out that I probably need to use HttpURLConnection to do this and this is what I got so far:
This is not working at all and I hope someone knows how to achieve this.
URL url = new URL("http://192.168.0.66/cgi-bin/zapTo?path=");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
BufferedWriter out = new BufferedWriter( new OutputStreamWriter(conn.getOutputStream()));