Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    16
    Vote Rating
    0
    hamzazar is on a distinguished road

      0  

    Default Unanswered: Parse XML in external API probelem

    Unanswered: Parse XML in external API probelem


    I need to use external API but I get this error :

    XMLHttpRequest cannot load
    localhost/exemple
    Origin
    www.example.com is not allowed by Access-Control-Allow-Origin.


    I foud many developper have the same problem but any clear response. Last time I get the same problem in other project but I was able to solve it using JSONP because I can make changes in the server. But now I can't I have a XML response that I need to parse it, when I test the same URL in the browser I get response without problem.

    Any help please?

  2. #2
    Sencha User
    Join Date
    Aug 2012
    Posts
    1
    Vote Rating
    0
    gigantisch is on a distinguished road

      0  

    Default


    You ran into a same domain policy issue. Your app running at yourapp.com for instance is not allowed to get resources from a different domain: www.example.com.

    If you are maintaining www.example.com you can control access to it. See http://enable-cors.org/ on how to do this. If you can't control the config of www.example.com you could use a proxy on yourapp.com domain to retrieve the XML from the other domain.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    16
    Vote Rating
    0
    hamzazar is on a distinguished road

      0  

    Default


    Thank you for your reply, I can't control the example.com also my app will be native and so we will not host it into server only package it.

    I use already proxy but I get the same problem message.

Thread Participants: 1

Tags for this Thread