* Please note query parameters and custom query component are mutually exclusive. This method * will remove custom query if present. *
* * @since 4.3 */ public URIBuilder setParameters(final List* Please note query parameters and custom query component are mutually exclusive. This method * will remove custom query if present. *
* * @since 4.3 */ public URIBuilder addParameters(final List* Please note query parameters and custom query component are mutually exclusive. This method * will remove custom query if present. *
* * @since 4.3 */ public URIBuilder setParameters(final NameValuePair... nvps) { if (this.queryParams == null) { this.queryParams = new ArrayList<>(); } else { this.queryParams.clear(); } for (final NameValuePair nvp: nvps) { this.queryParams.add(nvp); } this.encodedQuery = null; this.encodedSchemeSpecificPart = null; this.query = null; return this; } /** * Adds parameter to URI query. The parameter name and value are expected to be unescaped * and may contain non ASCII characters. ** Please note query parameters and custom query component are mutually exclusive. This method * will remove custom query if present. *
*/ public URIBuilder addParameter(final String param, final String value) { if (this.queryParams == null) { this.queryParams = new ArrayList<>(); } this.queryParams.add(new BasicNameValuePair(param, value)); this.encodedQuery = null; this.encodedSchemeSpecificPart = null; this.query = null; return this; } /** * Sets parameter of URI query overriding existing value if set. The parameter name and value * are expected to be unescaped and may contain non ASCII characters. ** Please note query parameters and custom query component are mutually exclusive. This method * will remove custom query if present. *
*/ public URIBuilder setParameter(final String param, final String value) { if (this.queryParams == null) { this.queryParams = new ArrayList<>(); } if (!this.queryParams.isEmpty()) { for (final Iterator* Please note query parameters and custom query component are mutually exclusive. This method * will remove query parameters if present. *
* * @since 4.3 */ public URIBuilder setCustomQuery(final String query) { this.query = query; this.encodedQuery = null; this.encodedSchemeSpecificPart = null; this.queryParams = null; return this; } /** * Sets URI fragment. The value is expected to be unescaped and may contain non ASCII * characters. */ public URIBuilder setFragment(final String fragment) { this.fragment = fragment; this.encodedFragment = null; return this; } /** * @since 4.3 */ public boolean isAbsolute() { return this.scheme != null; } /** * @since 4.3 */ public boolean isOpaque() { return this.path == null; } public String getScheme() { return this.scheme; } public String getUserInfo() { return this.userInfo; } public String getHost() { return this.host; } public int getPort() { return this.port; } public String getPath() { return this.path; } public List