使用HttpClient
String uri = "http://10.207.40.191:9080/eup-transaction/monitor/doLogin.douserName=施主&password=88888888";
GetMethod getMethod = new GetMethod(uri);
抛出如下异常:java.lang.IllegalArgumentException: Invalid uri http://10.207.40.191:9080/eup-transaction/monitor/doLogin.douserName=施主&password=88888888': Invalid query
此问题如何解决?
------解决思路----------------------
String uri = "http://10.207.40.191:9080/eup-transaction/monitor/doLogin.do?userName=施主&password=88888888";
------解决思路----------------------
中文肯定要转码的
------解决思路----------------------
url在浏览器中测试好了,再放入代码