user326595
user326595

Reputation: 1

Setting Http Headers in blackberry application

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. What may be wrong?

Upvotes: 0

Views: 629

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038710

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.

Upvotes: 2

Related Questions