public final class OkHttpsURLConnection extends HttpsURLConnection
hostnameVerifier
chunkLength, fixedContentLength, fixedContentLengthLong, HTTP_ACCEPTED, HTTP_BAD_GATEWAY, HTTP_BAD_METHOD, HTTP_BAD_REQUEST, HTTP_CLIENT_TIMEOUT, HTTP_CONFLICT, HTTP_CREATED, HTTP_ENTITY_TOO_LARGE, HTTP_FORBIDDEN, HTTP_GATEWAY_TIMEOUT, HTTP_GONE, HTTP_INTERNAL_ERROR, HTTP_LENGTH_REQUIRED, HTTP_MOVED_PERM, HTTP_MOVED_TEMP, HTTP_MULT_CHOICE, HTTP_NO_CONTENT, HTTP_NOT_ACCEPTABLE, HTTP_NOT_AUTHORITATIVE, HTTP_NOT_FOUND, HTTP_NOT_IMPLEMENTED, HTTP_NOT_MODIFIED, HTTP_OK, HTTP_PARTIAL, HTTP_PAYMENT_REQUIRED, HTTP_PRECON_FAILED, HTTP_PROXY_AUTH, HTTP_REQ_TOO_LONG, HTTP_RESET, HTTP_SEE_OTHER, HTTP_SERVER_ERROR, HTTP_UNAUTHORIZED, HTTP_UNAVAILABLE, HTTP_UNSUPPORTED_TYPE, HTTP_USE_PROXY, HTTP_VERSION, instanceFollowRedirects, method, responseCode, responseMessage
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches
Constructor and Description |
---|
OkHttpsURLConnection(OkHttpURLConnection delegate) |
OkHttpsURLConnection(URL url,
OkHttpClient client) |
OkHttpsURLConnection(URL url,
OkHttpClient client,
URLFilter filter) |
getDefaultHostnameVerifier, getDefaultSSLSocketFactory, setDefaultHostnameVerifier, setDefaultSSLSocketFactory
getFollowRedirects, setFollowRedirects
public OkHttpsURLConnection(URL url, OkHttpClient client)
public OkHttpsURLConnection(URL url, OkHttpClient client, URLFilter filter)
public OkHttpsURLConnection(OkHttpURLConnection delegate)
protected Handshake handshake()
public void setHostnameVerifier(HostnameVerifier hostnameVerifier)
public HostnameVerifier getHostnameVerifier()
public void setSSLSocketFactory(SSLSocketFactory sslSocketFactory)
public SSLSocketFactory getSSLSocketFactory()
public String getCipherSuite()
getCipherSuite
in class HttpsURLConnection
public Certificate[] getLocalCertificates()
getLocalCertificates
in class HttpsURLConnection
public Certificate[] getServerCertificates() throws SSLPeerUnverifiedException
getServerCertificates
in class HttpsURLConnection
SSLPeerUnverifiedException
public Principal getPeerPrincipal() throws SSLPeerUnverifiedException
getPeerPrincipal
in class HttpsURLConnection
SSLPeerUnverifiedException
public Principal getLocalPrincipal()
getLocalPrincipal
in class HttpsURLConnection
public void connect() throws IOException
connect
in class URLConnection
IOException
public void disconnect()
disconnect
in class HttpURLConnection
public InputStream getErrorStream()
getErrorStream
in class HttpURLConnection
public String getRequestMethod()
getRequestMethod
in class HttpURLConnection
public int getResponseCode() throws IOException
getResponseCode
in class HttpURLConnection
IOException
public String getResponseMessage() throws IOException
getResponseMessage
in class HttpURLConnection
IOException
public void setRequestMethod(String method) throws ProtocolException
setRequestMethod
in class HttpURLConnection
ProtocolException
public boolean usingProxy()
usingProxy
in class HttpURLConnection
public boolean getInstanceFollowRedirects()
getInstanceFollowRedirects
in class HttpURLConnection
public void setInstanceFollowRedirects(boolean followRedirects)
setInstanceFollowRedirects
in class HttpURLConnection
public boolean getAllowUserInteraction()
getAllowUserInteraction
in class URLConnection
public Object getContent() throws IOException
getContent
in class URLConnection
IOException
public Object getContent(Class[] types) throws IOException
getContent
in class URLConnection
IOException
public String getContentEncoding()
getContentEncoding
in class URLConnection
public int getContentLength()
getContentLength
in class URLConnection
public long getContentLengthLong()
getContentLengthLong
in class URLConnection
public String getContentType()
getContentType
in class URLConnection
public long getDate()
getDate
in class URLConnection
public boolean getDefaultUseCaches()
getDefaultUseCaches
in class URLConnection
public boolean getDoInput()
getDoInput
in class URLConnection
public boolean getDoOutput()
getDoOutput
in class URLConnection
public long getExpiration()
getExpiration
in class URLConnection
public String getHeaderField(int pos)
getHeaderField
in class HttpURLConnection
public Map<String,List<String>> getHeaderFields()
getHeaderFields
in class URLConnection
public Map<String,List<String>> getRequestProperties()
getRequestProperties
in class URLConnection
public void addRequestProperty(String field, String newValue)
addRequestProperty
in class URLConnection
public String getHeaderField(String key)
getHeaderField
in class URLConnection
public long getHeaderFieldLong(String field, long defaultValue)
getHeaderFieldLong
in class URLConnection
public long getHeaderFieldDate(String field, long defaultValue)
getHeaderFieldDate
in class HttpURLConnection
public int getHeaderFieldInt(String field, int defaultValue)
getHeaderFieldInt
in class URLConnection
public String getHeaderFieldKey(int position)
getHeaderFieldKey
in class HttpURLConnection
public long getIfModifiedSince()
getIfModifiedSince
in class URLConnection
public InputStream getInputStream() throws IOException
getInputStream
in class URLConnection
IOException
public long getLastModified()
getLastModified
in class URLConnection
public OutputStream getOutputStream() throws IOException
getOutputStream
in class URLConnection
IOException
public Permission getPermission() throws IOException
getPermission
in class HttpURLConnection
IOException
public String getRequestProperty(String field)
getRequestProperty
in class URLConnection
public URL getURL()
getURL
in class URLConnection
public boolean getUseCaches()
getUseCaches
in class URLConnection
public void setAllowUserInteraction(boolean newValue)
setAllowUserInteraction
in class URLConnection
public void setDefaultUseCaches(boolean newValue)
setDefaultUseCaches
in class URLConnection
public void setDoInput(boolean newValue)
setDoInput
in class URLConnection
public void setDoOutput(boolean newValue)
setDoOutput
in class URLConnection
public void setFixedLengthStreamingMode(long contentLength)
setFixedLengthStreamingMode
in class HttpURLConnection
public void setIfModifiedSince(long newValue)
setIfModifiedSince
in class URLConnection
public void setRequestProperty(String field, String newValue)
setRequestProperty
in class URLConnection
public void setUseCaches(boolean newValue)
setUseCaches
in class URLConnection
public void setConnectTimeout(int timeoutMillis)
setConnectTimeout
in class URLConnection
public int getConnectTimeout()
getConnectTimeout
in class URLConnection
public void setReadTimeout(int timeoutMillis)
setReadTimeout
in class URLConnection
public int getReadTimeout()
getReadTimeout
in class URLConnection
public String toString()
toString
in class URLConnection
public void setFixedLengthStreamingMode(int contentLength)
setFixedLengthStreamingMode
in class HttpURLConnection
public void setChunkedStreamingMode(int chunkLength)
setChunkedStreamingMode
in class HttpURLConnection
Copyright © 2018. All rights reserved.