-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
There are lots of things that use OkHttp.
OkHttp okhttp#1063 provides a default user-agent, but that does make it easy to figure out what is (ab)using quotas.
It's traditional for clients of libraries to fill in their own useragent (typically embedding their underlying agent w/in the field).
For a general sense of how user-agents are written, please see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
In general, basically the syntax is:
TokenA/1.1 (platform; information; ...) TokenB/2.3 ...
The GitHub.com folks reported that the majority of my quota was spent by:
okhttp/2.7.5
But I can't easily tell if that's:
- Some Scala code
- Sbt
- This jenkins plugin
- Some other jenkins plugin
Ideally, the user-agent would be something like:
github-branch-source-plugin/2.5.7 okhttp/2.7.5
If you expect to have issues involving the java version, then including the java version in the UA could be useful...
To get the okhttp version one can do something like:
import com.squareup.okhttp.internal.Version;
Version.userAgent();
jsoref Totally support this being done. It might require some update to github-api library which you're already familiar with.