@DELETE("users?")
Observable<APIResponseModal> deleteUser(
@Query("userID") int userID
);
public void deleteUser(int userID) {
Config config = new Config();
Retrofit rfDatabase = config.databaseServer();
api_database = rfDatabase.create(API_Database.class);
Observable<APIResponseModal> deleteuser = api_database.deleteUser(userID);
deleteuser.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Subscriber<APIResponseModal>() {
@Override
public void onNext(APIResponseModal apiResponseModal) {
apiResponseModal.getResponseCode();
apiResponseModal.getResponseMessage();
}
@Override
public void onCompleted() {
Toast.makeText(mainActivity, "User Deleted", Toast.LENGTH_SHORT).show();
}
@Override
public void onError(Throwable e) {
}
});
获取JsonMalformedException,有人可以帮我解决这个问题吗?