src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpClient.java
branchhttp-client-branch
changeset 56043 08e8e41841cf
parent 56025 1f88e1587067
child 56079 d23b02f37fce
equal deleted inserted replaced
56042:40d7b06bb6e9 56043:08e8e41841cf
   205          * and responses to the same
   205          * and responses to the same
   206          * <a href="https://tools.ietf.org/html/rfc6454#section-4">origin server</a>
   206          * <a href="https://tools.ietf.org/html/rfc6454#section-4">origin server</a>
   207          * will use HTTP/2. If the upgrade fails, then the response will be
   207          * will use HTTP/2. If the upgrade fails, then the response will be
   208          * handled using HTTP/1.1
   208          * handled using HTTP/1.1
   209          *
   209          *
       
   210          * @implNote Constraints may also affect the selection of protocol version. 
       
   211          * For example, if HTTP/2 is requested through a proxy, and if the implementation
       
   212          * does not support this mode, then HTTP/1.1 may be used
       
   213          *
   210          * @param version the requested HTTP protocol version
   214          * @param version the requested HTTP protocol version
   211          * @return this builder
   215          * @return this builder
   212          */
   216          */
   213         public abstract Builder version(HttpClient.Version version);
   217         public abstract Builder version(HttpClient.Version version);
   214 
   218 
   326      * @return an {@code Optional} containing this client's {@code Authenticator}
   330      * @return an {@code Optional} containing this client's {@code Authenticator}
   327      */
   331      */
   328     public abstract Optional<Authenticator> authenticator();
   332     public abstract Optional<Authenticator> authenticator();
   329 
   333 
   330     /**
   334     /**
   331      * Returns the HTTP protocol version requested for this client. The default
   335      * Returns the preferred HTTP protocol version for this client. The default
   332      * value is {@link HttpClient.Version#HTTP_2}
   336      * value is {@link HttpClient.Version#HTTP_2}
       
   337      *
       
   338      * @implNote Constraints may also affect the selection of protocol version. 
       
   339      * For example, if HTTP/2 is requested through a proxy, and if the implementation
       
   340      * does not support this mode, then HTTP/1.1 may be used
   333      *
   341      *
   334      * @return the HTTP protocol version requested
   342      * @return the HTTP protocol version requested
   335      */
   343      */
   336     public abstract HttpClient.Version version();
   344     public abstract HttpClient.Version version();
   337 
   345