Created
January 24, 2017 08:50
-
-
Save bangiqi/6e91ef9140c620ebf07187247e32663d to your computer and use it in GitHub Desktop.
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
Gson gson2 = new Gson(); | |
DataSurveyFasilitator a = gson2.fromJson (keySurvey, DataSurveyFasilitator.class); | |
Log.d(TAG, "hasil add json aja: "+gson2.toJson(a)); | |
Call<DataSurveyFasilitator> call = service.postSurvey(a); | |
// Asynchronously execute HTTP request | |
call.enqueue(new Callback<DataSurveyFasilitator>() { | |
@Override | |
public void onResponse(Call<DataSurveyFasilitator> call, Response<DataSurveyFasilitator> response) { | |
// http response status code + headers | |
System.out.println("Response status code: " + response.code()); | |
System.out.println("response body aja : "+new Gson().toJson(response.body())); | |
// isSuccess is true if response code => 200 and <= 300 | |
..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment