类 JdkHttpClientRequest

  • 所有已实现的接口:
    HttpClientRequest, java.io.Closeable, java.lang.AutoCloseable

    public class JdkHttpClientRequest
    extends java.lang.Object
    implements HttpClientRequest
    JDK http client request implement.
    作者:
    mai.jh
    • 字段详细资料

      • CONTENT_LENGTH

        private static final java.lang.String CONTENT_LENGTH
        另请参阅:
        常量字段值
    • 构造器详细资料

      • JdkHttpClientRequest

        public JdkHttpClientRequest​(HttpClientConfig httpClientConfig)
    • 方法详细资料

      • setSSLContext

        public void setSSLContext​(javax.net.ssl.SSLContext sslContext)
        Use specified SSLContext.
        参数:
        sslContext - ssl context
      • replaceSSLHostnameVerifier

        public void replaceSSLHostnameVerifier​(javax.net.ssl.HostnameVerifier hostnameVerifier)
        Replace the default HostnameVerifier.
        参数:
        hostnameVerifier - custom hostnameVerifier
      • execute

        public HttpClientResponse execute​(java.net.URI uri,
                                          java.lang.String httpMethod,
                                          RequestHttpEntity requestHttpEntity)
                                   throws java.lang.Exception
        从接口复制的说明: HttpClientRequest
        execute http request.
        指定者:
        execute 在接口中 HttpClientRequest
        参数:
        uri - http url
        httpMethod - http request method
        requestHttpEntity - http request entity
        返回:
        HttpClientResponse
        抛出:
        java.lang.Exception - ex
      • replaceDefaultConfig

        private void replaceDefaultConfig​(HttpClientConfig replaceConfig)
        Replace the HTTP config created by default with the HTTP config specified in the request.
        参数:
        replaceConfig - http config
      • close

        public void close()
                   throws java.io.IOException
        指定者:
        close 在接口中 java.lang.AutoCloseable
        指定者:
        close 在接口中 java.io.Closeable
        抛出:
        java.io.IOException