阅读背景:

在URLConnection中设置标头的正确方法是什么?

来源:互联网 

My code is like the following:

我的代码如下:

URLConnection cnx = address.openConnection();
cnx.setAllowUserInteraction(false);         
cnx.setDoOutput(true);
cnx.addRequestProperty("User-Agent", 
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
InputStream is = cnx.getInputStream();
URLC



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: