Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @PUT("{username}")
- Call<Void> updateUser(@Path("username") String username,@Body User user);
- private void updateUser() {
- User user = new User("iryna", "Alala", "alala@gmail.com", "some properties" );
- Call<Void> deleteRequest = App.service.updateUser("bala", user);
- deleteRequest.enqueue(new Callback<Void>() {
- @Override
- public void onResponse(Call<Void> call, Response<Void> response) {
- // use response.code, response.headers, etc.
- }
- @Override
- public void onFailure(Call<Void> call, Throwable t) {
- // handle failure
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement