11-23-2012 01:43 AM - edited 11-23-2012 01:57 AM
I am developing a BlackBerry Webworks project with phonegap support, i was trying to post ajax request with headers in my code. Some how i was not able to send the request with the header information. I have read some post and added the url in config.xml <access subdomains="true" uri="http://mydomain.com/" /> but still no hope.
Below is my code for sending headers:
var request = new XMLHttpRequest();
request.open('GET', url, true);
request.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
Am not sure what am missing. Hope you guys will help me out in this issue.
Praveen Kumar P
Solved! Go to Solution.
11-29-2012 02:14 AM
It seems that Authorization keyword has some issues while we use that in the RequestHeader. So i changed the value of the Header Name and it worked.
Still am not sure why the Authorization header name didnt work in RequestHeader