我们假设这个URL ...
http://www.example.com/page.php?id=10
Run Code Online (Sandbox Code Playgroud)
(这里需要在POST请求中发送id)
我想发送id = 10到服务器page.php,它在POST方法中接受它.
我怎样才能从Java中做到这一点?
我试过这个:
URL aaa = new URL("http://www.example.com/page.php");
URLConnection ccc = aaa.openConnection();
Run Code Online (Sandbox Code Playgroud)
但我仍然无法弄清楚如何通过POST发送它
什么是......之间的区别
Thread.currentThread().sleep(time)
Run Code Online (Sandbox Code Playgroud)
和
Thread.sleep(time);
Run Code Online (Sandbox Code Playgroud)
还有一件事是我可以在不使用Thread Class的情况下延迟程序的另一种方法...