org.kohsuke.github.extras
Class OkHttpConnector

java.lang.Object
  extended by org.kohsuke.github.extras.OkHttpConnector
All Implemented Interfaces:
HttpConnector

public class OkHttpConnector
extends Object
implements HttpConnector

HttpConnector for OkHttpClient. Unlike HttpConnector.DEFAULT, OkHttp does response caching. Making a conditional request against GitHubAPI and receiving a 304 response does not count against the rate limit. See http://developer.github.com/v3/#conditional-requests

Author:
Roberto Tyley, Kohsuke Kawaguchi

Field Summary
 
Fields inherited from interface org.kohsuke.github.HttpConnector
DEFAULT
 
Constructor Summary
OkHttpConnector(com.squareup.okhttp.OkUrlFactory urlFactory)
           
 
Method Summary
 HttpURLConnection connect(URL url)
          Opens a connection to the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OkHttpConnector

public OkHttpConnector(com.squareup.okhttp.OkUrlFactory urlFactory)
Method Detail

connect

public HttpURLConnection connect(URL url)
                          throws IOException
Description copied from interface: HttpConnector
Opens a connection to the given URL.

Specified by:
connect in interface HttpConnector
Throws:
IOException


Copyright © 2014. All rights reserved.