01-27-2014 02:10 PM
I am using below link to send an http get request in blackberry webworks application.
Calling updateContent (http://www.google.com) on click of button.
I have whitelisted the url in config.xml.
Now getting response as blank and req.status as 0.
Please let me know what I am doing wrong.
Solved! Go to Solution.
01-27-2014 06:35 PM - edited 01-29-2014 02:54 PM
Based on some testing:
Where I've substituted http://www.domain.com with various URLs, I am seeing a readyState 4, status 0 come up often when there is a security violation due to cross-domain requests. This is not something that can exactly be fixed on the client side if the server is denying that sort of access.
When I made the request to a domain on the same server that was hosting the above sample index.html, the request worked just fine.
You can test this further here:
EDIT: What this amounts to then is that the destination server likely is not allowing Cross-Origin requests, and you simply won't be able to make the request to that URL.