Package com.tencentcloudapi.common.http
Class HttpConnection
- java.lang.Object
-
- com.tencentcloudapi.common.http.HttpConnection
-
public class HttpConnection extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpConnection(Integer connTimeout, Integer readTimeout, Integer writeTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addInterceptors(okhttp3.Interceptor interceptor)
okhttp3.Response
doRequest(okhttp3.Request request)
okhttp3.Response
getRequest(String url)
okhttp3.Response
getRequest(String url, okhttp3.Headers headers)
okhttp3.Response
postRequest(String url, byte[] body, okhttp3.Headers headers)
okhttp3.Response
postRequest(String url, String body)
okhttp3.Response
postRequest(String url, String body, okhttp3.Headers headers)
void
setProxy(Proxy proxy)
void
setProxyAuthenticator(okhttp3.Authenticator authenticator)
void
setSSLSocketFactory(SSLSocketFactory sslSocketFactory)
Deprecated.void
setSSLSocketFactory(SSLSocketFactory sslSocketFactory, X509TrustManager trustManager)
-
-
-
Method Detail
-
addInterceptors
public void addInterceptors(okhttp3.Interceptor interceptor)
-
setProxy
public void setProxy(Proxy proxy)
-
setProxyAuthenticator
public void setProxyAuthenticator(okhttp3.Authenticator authenticator)
-
setSSLSocketFactory
@Deprecated public void setSSLSocketFactory(SSLSocketFactory sslSocketFactory)
Deprecated.
-
setSSLSocketFactory
public void setSSLSocketFactory(SSLSocketFactory sslSocketFactory, X509TrustManager trustManager)
-
doRequest
public okhttp3.Response doRequest(okhttp3.Request request) throws IOException
- Throws:
IOException
-
getRequest
public okhttp3.Response getRequest(String url) throws TencentCloudSDKException, IOException
- Throws:
TencentCloudSDKException
IOException
-
getRequest
public okhttp3.Response getRequest(String url, okhttp3.Headers headers) throws TencentCloudSDKException, IOException
- Throws:
TencentCloudSDKException
IOException
-
postRequest
public okhttp3.Response postRequest(String url, String body) throws TencentCloudSDKException, IOException
- Throws:
TencentCloudSDKException
IOException
-
postRequest
public okhttp3.Response postRequest(String url, String body, okhttp3.Headers headers) throws TencentCloudSDKException, IOException
- Throws:
TencentCloudSDKException
IOException
-
postRequest
public okhttp3.Response postRequest(String url, byte[] body, okhttp3.Headers headers) throws TencentCloudSDKException, IOException
- Throws:
TencentCloudSDKException
IOException
-
-