Open theindra opened 7 years ago
@theindra would customizing the Android volley template meet your requirement?
Android Volley templates: https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources/android/libraries/volley
Probably... I've never tried adopting a template.
It should be fixed by setting the RetryPolicy of the request at the end of the method createRequest.
@theindra you can also use the Java Retrofit2 API client instead: https://github.com/swagger-api/swagger-codegen/wiki/FAQ#how-can-i-generate-an-android-sdk
Adopting the template worked for us. We haven't tried Retrofit2.
I have a problem that my swagger generated code is executing the requests twice sometimes. I think this is due to the RetryPolicy of the volley library.
Description: https://stackoverflow.com/questions/26264942/android-volley-makes-2-requests-to-the-server-when-retry-policy-is-set-to-0
Now I want to set the RetryPolicy of my swagger generated code with out changing the ApiInvoker-Class everytime after regeneration of the code. Is any possibility to accomplish that?