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 voidaddInterceptors(okhttp3.Interceptor interceptor)okhttp3.ResponsedoRequest(okhttp3.Request request)okhttp3.ResponsegetRequest(String url)okhttp3.ResponsegetRequest(String url, okhttp3.Headers headers)okhttp3.ResponsepostRequest(String url, byte[] body, okhttp3.Headers headers)okhttp3.ResponsepostRequest(String url, String body)okhttp3.ResponsepostRequest(String url, String body, okhttp3.Headers headers)voidsetProxy(Proxy proxy)voidsetProxyAuthenticator(okhttp3.Authenticator authenticator)voidsetSSLSocketFactory(SSLSocketFactory sslSocketFactory)Deprecated.voidsetSSLSocketFactory(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:
TencentCloudSDKExceptionIOException
-
getRequest
public okhttp3.Response getRequest(String url, okhttp3.Headers headers) throws TencentCloudSDKException, IOException
- Throws:
TencentCloudSDKExceptionIOException
-
postRequest
public okhttp3.Response postRequest(String url, String body) throws TencentCloudSDKException, IOException
- Throws:
TencentCloudSDKExceptionIOException
-
postRequest
public okhttp3.Response postRequest(String url, String body, okhttp3.Headers headers) throws TencentCloudSDKException, IOException
- Throws:
TencentCloudSDKExceptionIOException
-
postRequest
public okhttp3.Response postRequest(String url, byte[] body, okhttp3.Headers headers) throws TencentCloudSDKException, IOException
- Throws:
TencentCloudSDKExceptionIOException
-
-