Class ExtendedHttpClient


  • public class ExtendedHttpClient
    extends java.net.http.HttpClient
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ExtendedHttpClient.Builder  
      • Nested classes/interfaces inherited from class java.net.http.HttpClient

        java.net.http.HttpClient.Redirect, java.net.http.HttpClient.Version
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.net.Authenticator> authenticator()  
      java.util.Optional<java.time.Duration> connectTimeout()  
      java.util.Optional<java.net.CookieHandler> cookieHandler()  
      java.util.Optional<java.util.concurrent.Executor> executor()  
      java.net.http.HttpClient.Redirect followRedirects()  
      static ExtendedHttpClient.Builder newBuilder()
      Creates a new ExtendedHttpClient builder.
      static ExtendedHttpClient newHttpClient()
      Create a new ExtendedHttpClient with in memory cache and transparent encoding enabled.
      java.net.http.WebSocket.Builder newWebSocketBuilder()  
      java.util.Optional<java.net.ProxySelector> proxy()  
      <T> java.net.http.HttpResponse<T> send​(java.net.http.HttpRequest request, java.net.http.HttpResponse.BodyHandler<T> bodyHandler)  
      <T> java.util.concurrent.CompletableFuture<java.net.http.HttpResponse<T>> sendAsync​(java.net.http.HttpRequest request, java.net.http.HttpResponse.BodyHandler<T> bodyHandler)  
      <T> java.util.concurrent.CompletableFuture<java.net.http.HttpResponse<T>> sendAsync​(java.net.http.HttpRequest request, java.net.http.HttpResponse.BodyHandler<T> bodyHandler, java.net.http.HttpResponse.PushPromiseHandler<T> pushPromiseHandler)  
      javax.net.ssl.SSLContext sslContext()  
      javax.net.ssl.SSLParameters sslParameters()  
      java.net.http.HttpClient.Version version()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • newBuilder

        public static ExtendedHttpClient.Builder newBuilder()
        Creates a new ExtendedHttpClient builder.
        Returns:
        an ExtendedHttpClient.Builder
      • newHttpClient

        public static ExtendedHttpClient newHttpClient()
        Create a new ExtendedHttpClient with in memory cache and transparent encoding enabled.
        Returns:
        an ExtendedHttpClient with default settings.
      • cookieHandler

        public java.util.Optional<java.net.CookieHandler> cookieHandler()
        Specified by:
        cookieHandler in class java.net.http.HttpClient
      • connectTimeout

        public java.util.Optional<java.time.Duration> connectTimeout()
        Specified by:
        connectTimeout in class java.net.http.HttpClient
      • followRedirects

        public java.net.http.HttpClient.Redirect followRedirects()
        Specified by:
        followRedirects in class java.net.http.HttpClient
      • proxy

        public java.util.Optional<java.net.ProxySelector> proxy()
        Specified by:
        proxy in class java.net.http.HttpClient
      • sslContext

        public javax.net.ssl.SSLContext sslContext()
        Specified by:
        sslContext in class java.net.http.HttpClient
      • sslParameters

        public javax.net.ssl.SSLParameters sslParameters()
        Specified by:
        sslParameters in class java.net.http.HttpClient
      • authenticator

        public java.util.Optional<java.net.Authenticator> authenticator()
        Specified by:
        authenticator in class java.net.http.HttpClient
      • version

        public java.net.http.HttpClient.Version version()
        Specified by:
        version in class java.net.http.HttpClient
      • executor

        public java.util.Optional<java.util.concurrent.Executor> executor()
        Specified by:
        executor in class java.net.http.HttpClient
      • newWebSocketBuilder

        public java.net.http.WebSocket.Builder newWebSocketBuilder()
        Overrides:
        newWebSocketBuilder in class java.net.http.HttpClient
      • send

        public <T> java.net.http.HttpResponse<T> send​(java.net.http.HttpRequest request,
                                                      java.net.http.HttpResponse.BodyHandler<T> bodyHandler)
                                               throws java.io.IOException,
                                                      java.lang.InterruptedException
        Specified by:
        send in class java.net.http.HttpClient
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • sendAsync

        public <T> java.util.concurrent.CompletableFuture<java.net.http.HttpResponse<T>> sendAsync​(java.net.http.HttpRequest request,
                                                                                                   java.net.http.HttpResponse.BodyHandler<T> bodyHandler)
        Specified by:
        sendAsync in class java.net.http.HttpClient
      • sendAsync

        public <T> java.util.concurrent.CompletableFuture<java.net.http.HttpResponse<T>> sendAsync​(java.net.http.HttpRequest request,
                                                                                                   java.net.http.HttpResponse.BodyHandler<T> bodyHandler,
                                                                                                   java.net.http.HttpResponse.PushPromiseHandler<T> pushPromiseHandler)
        Specified by:
        sendAsync in class java.net.http.HttpClient