0

I am working with Android code that was written around 2017. The person who worked on it was using loopj. These are the imports he was using to make http requests to the backend Python server:

import com.loopj.android.http.AsyncHttpClient;  
import com.loopj.android.http.JsonHttpResponseHandler;  
import com.loopj.android.http.RequestHandle;  
import com.loopj.android.http.RequestParams; 

Obviously, a lot has changed since then. Is it a good idea to continue using this or is a better library now available? I searched the official Android Studio tutorials and I came across Volley: https://developer.android.com/training/volley/simple Should I use this or is there an even better alternative? I have no background in creating http clients.

Also, his client (using loopj) involves a huge amount of boilerplate code. I get the feeling that the modern libraries probably have less boilerplate code and, thus, allow us to focus more on sending data.

There are two types of data that I send: json data and byte array (the byte array represents the camera image).

I asked around in other places and someone recommended Retrofit. Is it a good alternative to loopj?

  • I'm not sure if this is a dup, but [here is a comparison of Loopj and Volley](https://stackoverflow.com/q/25346813/1270789). – Ken Y-N May 28 '21 at 06:23
  • If u r looking for latest trends, look into [OkHttp](https://github.com/square/okhttp) + [Retrofit](https://github.com/square/retrofit). – Roshana Pitigala May 28 '21 at 06:27

0 Answers0