[Solved] Send a GET and POST Request not working for Instant Games

Hi,
I test a simple code to send a GET and POST request in order to retrieve values ​​in mysql database.

  • It’s works in my local Gdevelop5, I have response for my “Response scene variable”
  • It’s works when I export as an HTML5 games, it’s works also
  • when I export it as an “Instant games”, I see that he can write in my database
    Problem is that I have no response for my “Response scene variable” of my send request.
    Thank you

If all works except for Instant games, you know the culprit. :slight_smile:
If you can share a dummy project demonstrating the issue, we’ll forward it to the devs.

Thank you Gruk,:smile:

Thanks a lot

You have to configure the permissions on your server. Allow the external requests on your page test.php

It works on your website because the game and the request are from the same DNS.
Same in preview, (local IP are used)

But your game from FB Instant Game do a request on your website which block this kind of request by default.

More infor about this issue called CORS

1 Like

Thank you Bouh,
I’m not a real programmer but I have read this CORS carefully and now I understand how it’s works. Thanks again.
I don’t know how to put this topic “solved”
image

3 Likes

This topic was automatically closed after 32 hours. New replies are no longer allowed.