0 Favourites

How do I can read a external JSON or XML file?

  • Yes, I agree.

    As Jermfire , how does one request an XML from an URL which is hosted on a server? Like many, I have not been able to find a clear solution to this, most tutorials only demonstrate through project file import.

  • Access-Control-Allow-Origin is a response header, it's the server that allows it or not. You can't as a mere client tell the server to allow for cross-domain request, that would entirely defeats the purpose of cross-domain policy.

    The only solution is to have access to server configuration, and add that custom header there.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Access-Control-Allow-Origin is a response header, it's the server that allows it or not. You can't as a mere client tell the server to allow for cross-domain request, that would entirely defeats the purpose of cross-domain policy.

    The only solution is to have access to server configuration, and add that custom header there.

    When the answer hits you like a baseball bat to the head and you're just like: "Derp! Dummy self! You should have known that! wth were you thinking!!!"

    Let me clarify what was going on...

    We have a new house with a newer garage(Server). Got a cool car(Client/ C2Game).

    The garage has a cool lock that can detect only your car and let it in...as long as you set it up.

    We were trying to set the code for the car...in the car itself and bash it into the garage door, wondering why it wont open. Lovely.

    I think it's in part of the feeble description that's confusing to noobs.

  • Yep, the following sentence might be the culprit :

    If you want AJAX requests to your server to work from any domain, or in preview, you can configure it to send the following HTTP header

    hat does "it" refer to, the server, the request, the AJAX plugin ? It seems to assume you know what a response header is and where it should be configured.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)