I am creating REST APIs. Where do the APIs pick the values from( in the server side)? What exactly happens at the server side? I want to pass some values daily to the users.
❓ 3
Cheenu Soni
01/21/2021, 2:59 AM
@crummy I am an Android Developer. I am new to Server side development. Basically I want to send some data every day to my mobile app users. So I am creating my server and REST APIs for that. How do I feed the data to the APIs from the server side?
c
crummy
01/21/2021, 3:22 AM
I would instantiate a POST request using an HTTP client in your app, and use something like Ktor to receive the request and decide what to do with it
c
Cheenu Soni
01/21/2021, 3:43 AM
nooo.. thats the mobile app part. I am asking from where do the APIs get the value to pass to the clients/apps. From the web server database? If yes, Do I have to create a database and host it even if I just have to pass only small piece of data everyday?
c
crummy
01/21/2021, 4:48 AM
It depends what kind of data you want to return to the clients. If your API is designed to return a random quote every day, you wouldn't need a database.
a
asad.awadia
01/21/2021, 5:18 AM
You can do it however you want. Database. Variable. File.