如何在Android中不带参数的情况下在改造中使用post方法,
最佳答案
@POST("Common/GetPanelCounts")
Observable<CountPanelDTO> getPanelCounts();
Observable<CountPanelDTO> listObservable = mApiService.getPanelCounts();
subscribe(listObservable, dto -> view.setNotificationPanel(dto), new Consumer<Throwable>()
{
@Override
public void accept(Throwable throwable) throws Exception {
view.setNotificationPanel(null);
}
});