Donovant Donovant - 1 year ago 86
reST (reStructuredText) Question

What's the best way (in Android dev) to consume REST API (in addition to Retrofit)?

I quite new in Android developing platform (I'm frontender who has been using jQuery and now Angular2 (for 5 months) with RxJs ).
I used to code in core-Java in past for one year (6 years ago), so I'm little familiar with Java.

As I'm familiar with consuming REST API by using jQuery/Angular2 (which is really easy thing) I was wondering if there is any Android-framework to do that, or my only option is Retrofit, because I found it tangled to use.

Answer Source

Retrofit is your best choice if you want a direct mapping between api endpoints and Java Objects. You simply create DTOs and annotate each field with the corresponding json name.

Depending on the size and purpose of the api you may want to have a deeper control over what you send and receive, i.e. direct access to Request and Response objects. in this case, I recommend Volley library :-)