I am using okhttp 2.0 in my Android app and didn\'t find a way to set some common User Agent for all outgoing requests.
I thought I could do something like
Using an intercepter is no longer required in the newer versions of OkHttp. Adding a user agent is as simple as:
Request request = new Request.Builder() .url("http://www.publicobject.com/helloworld.txt") .header("User-Agent", "OkHttp Example") .build();
Source: OkHttp wiki.