0 votes

Hi,
I'm pretty new to this kind of stuff. I tried looking for something related in the Q&A but I couldn't find anything useful, so I'll ask it here: how can I update a file (say, a JSON) which is stored in an online server?

in Engine by (570 points)

1 Answer

+2 votes

To interact with an online resource in general, it's usually best to set up a REST API that can be contacted using HTTPRequest. Developing the API itself is out of the scope of this question, but pretty much any Web framework can be used for this. Microframeworks such as Flask tend to be popular for this use case.

In your case, your API will need to have one endpoint that will modify the JSON file when it's called. Remember that you will probably need to set up some sort of authentication mechanism too.

by (12,825 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.