i have problem to use model class in retrofit lib. A backend side field name has changed.
Is it possible to get response without model class?
@Vadivel here it is the version of GET based on @chetan work:
@GET("http://your.api.url")
Call getGenericJSON();
Call call = api.getGenericJSON();
call.enqueue(new Callback() {
@Override
public void onResponse(Call call, Response response) {
if (response.isSuccessful() && response.body() != null) {
Log.d(TAG, response.body().toString());
} else {
Log.e(TAG, "Error in getGenericJson:" + response.code() + " " + response.message());
}
}
@Override
public void onFailure(Call call, Throwable t) {
Log.e(TAG, "Response Error");
}
});