Consuming a restful API from Android app

2019-09-20 02:41发布

问题:

I have created a restful API that I have made using node.js and will deploy to Heroku. I want my android application to make requests to the web API. My understanding is that I will just have to send HTTP requests from the Android app using any external API that does the job. Is my assumption correct? Thank you

回答1:

Yes , you need to do API call to talk to your restful server . For this you can use any below implementation .

Sending Request

Retrofit

Retrofit Example

Async Client Example