Search in sources :

Example 1 with OkHttpConnector

use of org.kohsuke.github.extras.OkHttpConnector in project markdown-doclet by Abnaxos.

the class GithubAccessor method createCachedHttpConnector.

private OkHttpConnector createCachedHttpConnector() {
    final File cacheDirectory = getCacheDirectory();
    final Cache cache = new Cache(cacheDirectory, this.cacheSize);
    return new OkHttpConnector(new OkUrlFactory(new OkHttpClient().setCache(cache)));
}
Also used : OkUrlFactory(com.squareup.okhttp.OkUrlFactory) OkHttpClient(com.squareup.okhttp.OkHttpClient) OkHttpConnector(org.kohsuke.github.extras.OkHttpConnector) File(java.io.File) Cache(com.squareup.okhttp.Cache)

Aggregations

Cache (com.squareup.okhttp.Cache)1 OkHttpClient (com.squareup.okhttp.OkHttpClient)1 OkUrlFactory (com.squareup.okhttp.OkUrlFactory)1 File (java.io.File)1 OkHttpConnector (org.kohsuke.github.extras.OkHttpConnector)1