Created
April 23, 2017 09:11
-
-
Save ankit-cerulean-1/59f0f31025eabb2983de57410fe95862 to your computer and use it in GitHub Desktop.
aaaa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void getData() { | |
MainActivity.getRestClient().getRestInterface().getData().enqueue(new Callback<List<ModelClass>>() { | |
@Override | |
public void onResponse(Call<List<ModelClass>> call, Response<List<ModelClass>> response) { | |
//Toast.makeText(getApplicationContext(), "Call response", Toast.LENGTH_SHORT).show(); | |
if (response.isSuccessful()) { | |
List<ModelClass> allserverdata = response.body(); | |
} | |
} | |
@Override | |
public void onFailure(Call<List<ModelClass>> call, Throwable t) { | |
Log.d("Error in response :", t.getMessage()); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment