In retrofit there is a interface RequestInterceptor which a class can implement and then in the restadapter you can set this to be the setRequestInterceptor. an example from the net would be:
RequestInterceptor requestInterceptor = new RequestInterceptor() {
@Override
public void intercept(RequestFacade request) {
request.addHeader("User-Agent", "Retrofit-Sample-App");
}
};
RestAdapter restAdapter = new RestAdapter.Builder()
.setEndpoint("https://api.github.com")
.setRequestInterceptor(requestInterceptor)
.build();
Now for what i need help with. I was expecting the interceptor to be able to show me all the requests that are going out. Instead its a fascade and just a few methods are exposed. My end goal in retrofit is to be able to print a log of every call that goes out.