lets assume this URL…

http://www.example.com/page.php?id=10            

(Here id needs to be sent in a POST request)

I want to send the id = 10 to the server’s page.php, which accepts it in a POST method.

How can i do this from within Java?

I tried this :

URL aaa = new URL("https://www.example.com/page.php");
URLConnection ccc = aaa.openConnection();

But I still can’t figure out how to send it via POST

11 Answers
11

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *