I have the interface for retrofit
interface ApiInterface {
@GET
Observable<okhttp3.ResponseBody> get(@Url String url,
@HeaderMap Map<String, Object> headerMap,
@QueryMap HashMap<String, String> queryMap );
}
I call this way, and it works perfectly
HashMap<String, String> map = new HashMap<String, String>();
map.put("id","xyz");
apiInterface.get(url, getHeader(),map)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
but when I pass null, it does not work
return apiInterface.get(url, getHeader(),null)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread());
how pass null for retrofit an interface?