Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("192.0.2.100", 80));HttpURLConnection connection =(HttpURLConnection)new URL("http://abc.example.com").openConnection(proxy);connection.setDoOutput(true);connection.setDoInput(true);connection.setRequestProperty("Content-type", "text/xml");connection.setRequestProperty("Accept", "text/xml, application/xml");connection.setRequestMethod("POST");
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)