jquery - how to enable CORS for XML data -


i building web application need xml data several cross-domain feeds.

the annoying thing is: they're cross-domain. use jquery (script) on "local" domain, fetches xml other domain.

for enabling cors added headers , here code

$.ajax({             url: '/currencyconvertor.asmx/conversionratefromcurrency=usd&tocurrency=inr',             type: 'post',             crossdomain: true,             contenttype: 'application/xml',             origin: 'http://www.webservicex.net',             headers: {                 'access-control-allow origin': 'http://www.webservicex.net',                 'access-control-allow-credentials': 'true',                 'request headers caution': 'provisional headers shown',                 'access-control-request-headers': 'accept, content-type',                 'access-control-allow-methods': 'get,post'              }) 

but still i'm getting cors problem while running in firefox

and error i'm getting is

accept   */* accept-encoding  gzip, deflate accept-language  en-us,en;q=0.5 access-control-allow-cred...     true access-control-allow-orig...     http://www.webservicex.net cookie   _ga=ga1.1.256593039.1431427019 host     localhost:8383 referer  http://localhost:8383/cordovaapp/index3.html user-agent   mozilla/5.0 (windows nt 6.3; wow64; rv:38.0) gecko/20100101 firefox/38.0 


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -