netsrotr commented on a change in pull request #196:
URL: 
https://github.com/apache/httpcomponents-core/pull/196#discussion_r411569975



##########
File path: httpcore5/src/main/java/org/apache/hc/core5/net/URIBuilder.java
##########
@@ -264,13 +264,39 @@ public URIBuilder setScheme(final String scheme) {
     }
 
     /**
-     *Sets the URI scheme specific part.
+     * Sets the URI scheme specific part.
      *
      * @param schemeSpecificPart
-     * @param nvps Optional, can be null. List of query parameters to be 
reused by the specific scheme
      * @return this.
+     * @since 5.1
      */
-    public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart, 
final List <NameValuePair> nvps) {
+    public URIBuilder setSchemeSpecificPart(final String schemeSpecificPart) {
+        this.encodedSchemeSpecificPart = schemeSpecificPart;
+        return this;
+    }
+
+    /**
+     * Sets the URI scheme specific part and append a list of parameters to 
this part.
+     *
+     * @param schemeSpecificPart
+     * @param nvps Optional, can be null. List of NameValuePair query 
parameters to be reused by the specific scheme part
+     * @return this.
+     * @since 5.1
+     */
+    public URIBuilder setSchemeSpecificPartWithParameter(final String 
schemeSpecificPart, final NameValuePair... nvps) {

Review comment:
       The overloads taking `NameValuePair...` and `List<NameValuePair>` cannot 
have the same name.
   So I voted for an explicit setter (that match the getter) and differentiate 
the other by `...Parameter(...` and `...Parameters(...` 
   But: I can take whatever you prefer... Suggestions?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to