Payal Sorathiya
Payal Sorathiya

Reputation: 754

Retrofit Post method Without any Argument in android

how can I use post method in retrofit without argument in android,

@FormUrlEncoded
@POST("/attendanceJson.aspx")
void atendance(Callback<Atendance> callback);

Upvotes: 1

Views: 111

Answers (1)

Nirav Joshi
Nirav Joshi

Reputation: 1723

@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);
                    }
                });

Upvotes: 1

Related Questions