Any help making a Ajax plugin with Put and headers

0 favourites
  • 3 posts
From the Asset Store
Make your own platformer for both the web and mobile easy with this Santas Platformer Template, FULLY DOCUMENTED
  • Hi, if anyone can help me to make a ajax plug (working off default plugin) to do PUT and GET request with custom headers and header responses

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just a quick response, im in a hurry, so sorry if this is just pile of crap;

    Runtime.js, around line 149 there's a workaround for cocoonjs:

                   if (method_ === "POST" && data_)


                        if (request["setRequestHeader"])


                             request["setRequestHeader"]("Content-Type", "application/x-www-form-urlencoded");

                             request["setRequestHeader"]("Content-Length", data_.length);







    Could you use this snippet, make a varible like this.myHeader which you can set, and then replace the "setRequestHeader" with this.myHeader (and other stuff you need), and in construct before making the ajax call set this.myHeader with an action, and then make the call.

    "Need to have something working by end of day :(" -> Ahh, the good 'ole deadlines :D


  • I tried that but wasn't sure if it was being used in normal browsers, also my normal ajax stops working. I will upload what i have done thus far

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