开发者

Setting Http Headers in blackberry application

开发者 https://www.devze.com 2022-12-28 19:54 出处:网络
I have set the header as c.setRequestProperty(\"Content-Language\", \"en-US\"); in BB app and i am reading it on server as Request.ServerVariables(\"HTTP_ACCEPT_LANGUAGE\").

I have set the header as c.setRequestProperty("Content-Language", "en-US"); in BB app and i am reading it on server as Request.ServerVariables("HTTP_ACCEPT_LANGUAGE"). But i am getting a null value. Wha开发者_开发知识库t may be wrong?


The header you are trying to read is Accept-Language:

c.setRequestProperty("Accept-Language", "en-US");

If you want to use the Content-Language header, then you could read it with Request.ServerVariables("HTTP_CONTENT_LANGUAGE") constant.

0

精彩评论

暂无评论...
验证码 换一张
取 消