本站首页    管理页面    写新日志    退出


«January 2026»
123
45678910
11121314151617
18192021222324
25262728293031


公告
暂无公告...

我的分类(专题)

日志更新

最新评论

留言板

链接

Blog信息
blog名称:
日志总数:29
评论数量:19
留言数量:0
访问次数:118487
建立时间:2006年5月29日




[java与中文]httpconnection
软件技术

krf301 发表于 2007/4/21 20:28:52

httpconnection                   hc = (HttpConnection) Connector.open(url , Connector.READ/*_WRITE*/ , true ) ;                 if( gateway != null ){                    hc.setRequestProperty( "X-Online-Host", webServerAddress ) ;                }                hc.setRequestProperty("Content-Type" ,                         "application/xml, text/html, text/plain, " ) ;                 if(cookieSessionID!=null){                    hc.setRequestProperty("Cookie", cookieSessionID);                }                // 告知服务器当前客户端的版本号                //hc.setRequestProperty("User-Agent", "1.0") ;  错误!                hc.setRequestProperty("User-Agent","Profile/MIDP-2.0 Configuration/CLDC-1.1"); // CLDC-1.1                hc.setRequestProperty("Pragma", "no-cache");                hc.setRequestProperty("Cache-Control", "no-cache") ;                 //hc.setRequestProperty("Connection", "close");                hc.setRequestProperty("User-Chat-Agent",                         System.getProperty("microedition.platform") );                hc.setRequestProperty("Accept-Charset" , "utf-8" ) ;                 hc.setRequestProperty("Accept-Language", "zh, en" ) ;


阅读全文(1976) | 回复(0) | 编辑 | 精华
 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)



站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.439 second(s), page refreshed 144820297 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号