http-client-branch: clarify behavior of restricted methods in the builder http-client-branch
authorchegar
Fri, 19 Jan 2018 14:01:35 +0000
branchhttp-client-branch
changeset 56030 69fbcac27e35
parent 56025 1f88e1587067
child 56032 bea253ebd7ac
http-client-branch: clarify behavior of restricted methods in the builder
src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java	Thu Jan 18 19:51:17 2018 +0000
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java	Fri Jan 19 14:01:35 2018 +0000
@@ -440,12 +440,14 @@
          *
          * @apiNote The {@linkplain BodyPublisher#noBody() noBody} request
          * body publisher can be used where no request body is required or
-         * appropriate.
+         * appropriate. Whether a method is restricted, or not, is
+         * implementation specific. For example, some implementations may choose
+         * to restrict the {@code CONNECT} method.
          *
          * @param method the method to use
          * @param bodyPublisher the body publisher
          * @return a {@code HttpRequest}
-         * @throws IllegalArgumentException if the method is unrecognised
+         * @throws IllegalArgumentException if the method is restricted
          */
         public abstract Builder method(String method, BodyPublisher bodyPublisher);