jjzjj

addRequestProperty

全部标签

java - HttpUrlConnection addRequestProperty 方法不传递参数

我有一些可以执行以下操作的java代码:URLmyUrl=newURL("http://localhost:8080/webservice?user="+username+"&password="+password+"&request=x");HttpURLConnectionmyConnection=(HttpURLConnection)myUrl.openConnection();myConnection.setRequestMethod("POST");//codecontinuestoreadtheresponsestream但是,我注意到我的网络服务器访问日志包含所有连接用户