I am using Retrofit 2.0 for my project's api call. Every thing is working fine. Recently I came across a difficult scenario which I am unable to execute.
Working type of Retrofit Callback :
@GET
Call<***CountryPojo***> getCountries(@Header(headerAuthorization) String lang, @Url String url,@QueryMap Map<String, String> limit);
In the above callback "CountryPojo is the pojo class with getter and setter.
My requirement is to commonly keep a pojoclass Type, so that I can pass the particular pojo class into it and get back the callback.
For example:
@GET
Call<***CommonPojoClass***> getCountries(@Header(headerAuthorization) String lang, @Url String url,@QueryMap Map<String, String> limit);
How to do this ?. Any help should be greatly appreciated.