Start a Project

detecting Volley library auto request to Server API

Volley is an HTTP library that makes networking for Android apps easier and most importantly, faster. Volley is available on GitHub.

Volley offers the following benefits:

We have seen Volley library automatically call API once more when we call an API. In our case when we request a multipart API then We look that Volley request once more with same data of the first request, So how we detect auto request?

We can solve it by the setRetryPolicy method of Request class.

above multipartRequest is the object instance of Request class.

Now Full request code

 

References: https://developer.android.com/training/volley/index.html

Exit mobile version