@GET("/city/{cityId}/category/all")
Observable<MyDictionary> getDictionaries(@Path(value = "cityId", encoded = true) String cityId, @HeaderMap Map<String, String> headers);
Call method to retrieve data:
service.getDictionaries(cityId, headersMap)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(resp ->
{
/*...............*/
}, throwable ->
{
/*...............*/
});
I can get reposne eaisly. But I also need to know response headers. How to access them in my code? Any tips? I'm getting only body, how to get headers also?