public class OkHttpConnector extends java.lang.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-requestsDEFAULT, OFFLINE| Constructor and Description |
|---|
OkHttpConnector(com.squareup.okhttp.OkUrlFactory urlFactory) |
| Modifier and Type | Method and Description |
|---|---|
java.net.HttpURLConnection |
connect(java.net.URL url)
Opens a connection to the given URL.
|
public OkHttpConnector(com.squareup.okhttp.OkUrlFactory urlFactory)
public java.net.HttpURLConnection connect(java.net.URL url)
throws java.io.IOException
HttpConnectorconnect in interface HttpConnectorjava.io.IOExceptionCopyright © 2016. All Rights Reserved.