Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void addUser(User user){
- Call<User> call=userService.addUser(user);
- call.enqueue(new Callback<User>() {
- @Override
- public void onResponse(Call<User> call, Response<User> response) {
- if (response.isSuccessful()){
- Toast.makeText(MainActivity.this, "Add Successfully", Toast.LENGTH_SHORT).show();
- }
- }
- @Override
- public void onFailure(Call<User> call, Throwable t) {
- Log.e("ERR", t.getMessage() );
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement