Class JDKHttpClientConfig
java.lang.Object
com.github.scribejava.core.httpclient.jdk.JDKHttpClientConfig
- All Implemented Interfaces:
HttpClientConfig
public class JDKHttpClientConfig extends java.lang.Object implements HttpClientConfig
-
Constructor Summary
Constructors Constructor Description JDKHttpClientConfig() -
Method Summary
Modifier and Type Method Description JDKHttpClientConfigcreateDefaultConfig()static JDKHttpClientConfigdefaultConfig()java.lang.IntegergetConnectTimeout()java.net.ProxygetProxy()java.lang.IntegergetReadTimeout()booleanisFollowRedirects()voidsetConnectTimeout(java.lang.Integer connectTimeout)voidsetFollowRedirects(boolean followRedirects)Sets whether the underlying Http Connection follows redirects or not.voidsetProxy(java.net.Proxy proxy)voidsetReadTimeout(java.lang.Integer readTimeout)JDKHttpClientConfigwithConnectTimeout(java.lang.Integer connectTimeout)JDKHttpClientConfigwithFollowRedirects(boolean followRedirects)Sets whether the underlying Http Connection follows redirects or not.JDKHttpClientConfigwithProxy(java.net.Proxy proxy)JDKHttpClientConfigwithReadTimeout(java.lang.Integer readTimeout)
-
Constructor Details
-
JDKHttpClientConfig
public JDKHttpClientConfig()
-
-
Method Details
-
createDefaultConfig
- Specified by:
createDefaultConfigin interfaceHttpClientConfig
-
defaultConfig
-
getConnectTimeout
public java.lang.Integer getConnectTimeout() -
setConnectTimeout
public void setConnectTimeout(java.lang.Integer connectTimeout) -
withConnectTimeout
-
getReadTimeout
public java.lang.Integer getReadTimeout() -
setReadTimeout
public void setReadTimeout(java.lang.Integer readTimeout) -
withReadTimeout
-
setProxy
public void setProxy(java.net.Proxy proxy) -
getProxy
public java.net.Proxy getProxy() -
withProxy
-
isFollowRedirects
public boolean isFollowRedirects() -
setFollowRedirects
public void setFollowRedirects(boolean followRedirects)Sets whether the underlying Http Connection follows redirects or not. Defaults to true (follow redirects)- Parameters:
followRedirects- boolean- See Also:
- http://docs.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html#setInstanceFollowRedirects(boolean)
-
withFollowRedirects
Sets whether the underlying Http Connection follows redirects or not. Defaults to true (follow redirects)- Parameters:
followRedirects- boolean- Returns:
- this for chaining methods invocations
- See Also:
- http://docs.oracle.com/javase/6/docs/api/java/net/HttpURLConnection.html#setInstanceFollowRedirects(boolean)
-