There is an event:

@Subscribe public void onGetAuthEvent(GetAuthEvent getAuthEvent) { String email = (getAuthEvent.getEmail()); String password = (getAuthEvent.getPassword()); ApiInterface apiService = ApiClient.getClient().create(ApiInterface.class); Call<Account> call = apiService.auth(email, password); call.enqueue(new Callback<Account>() { @Override public void onResponse(Call<Account> call, Response<Account> response) { mBus.post(new SendAuthEvent(response)); } @Override public void onFailure(Call<Account> call, Throwable t) { Log.e("OnFailure:", t.toString()); } }); } 

What should the model look like to get the answer value?

    1 answer 1

    You do not need to give Response yourself in an event; it is enough to transmit the response body. https://square.imtqy.com/retrofit/2.x/retrofit/retrofit2/Response.html

     mBus.post(new SendAuthEvent(response.body()));