让我们假设这个URL…
http://www.example.com/page.php?id=10
(这里id需要在POST请求中发送)
我想将id = 10发送给服务器的page.php,后者在POST方法中接受它。
我如何从Java中做到这一点?
我试了一下:
URL aaa = new URL("http://www.example.com/page.php");
URLConnection ccc = aaa.openConnection();
但是我仍然不知道如何通过POST发送它
 
                                
                             
                                
                             
                                
                             
                                
                             
                                
                             
                                
                             
                                
                             
                                
                             
                                
                             
                                
                             
                                
                            