1 //请求
2 HttpURLConnection conn = (HttpURLConnection)new URL(path).openConnection();
3 conn.setConnecTimeout(5000);
4 conn.setRequestMethod("POST");
5 conn.setDoOutput(true);
6 conn.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
7 conn.setRequestProperty("Content-length", "aaa");
8 if(conn.getResponseCode()== 200){
9
10 return true;
11
12 }