如何在android中使用post方法进行改造而无需参数,
@FormUrlEncoded
@POST("/attendanceJson.aspx")
void atendance(Callback<Atendance> callback);
答案 0 :(得分:1)
@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);
}
});