Answer the question
In order to leave comments, you need to log in
What is the best way to get data remotely?
Hello. There is a need to store some data remotely and receive it in the application when it is launched. I chose to receive them using JSON over http, but I just can't figure out how to do it. It's hard to google the lines you need.
As far as I understand, there is a file.json file, which lies somewhere where you can turn to, an http request is made to it from the application to get the data that it contains
. Are there any specific examples on this issue?
Answer the question
In order to leave comments, you need to log in
Well, why not, there is. There are a lot of options:
- put mongodb, elasticsearch or something similar on the server and work through REST.
- write your own REST server, it is easy to write in any language, from Java to bash.
- well, just learn this simple REST technology habrahabr.ru/post/38730
If you chose HTTP, then you will need a web server in order to "raise" this protocol on the server, and on the web server you will also need to deploy the REST service engine and directly your web service, which will read the file and return it content. Usually, this approach is used for more complex tasks than just downloading a static file. If the whole point of the task is to download a file from a server, then you don't need a web server, JSON, or HTTP; use any file format that is readable by your software, and take the file, for example, via FTP...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question