Adds an URL query parameter to the request. Using a key twice will
result in the last call being taken into account.
@param key the parameter key.
@param value the parameter value.
197434
public RestBuilder withParam(String key, String value) {
        delegate.withParam(key, value);
        return this;
    }
686164
public Request query(String key, Object value) {
        this.query.put(key, value);
        return this;
    }
1127203
public static String addParameter(final String url, final String name, final String value) {
        if (url != null) {
            final StringBuilder sb = new StringBuilder();
            sb.append(url);
            if (name != null) {
                if (url.indexOf("?") >= 0) {
                    sb.append("&");
                } else {
                    sb.append("?");
                }
                sb.append(name);
                sb.append("=");
                if (value != null) {
                    sb.append(urlEncode(value));
                }
            }
            return sb.toString();
        }
        return null;
    }
242523
public void addQueryParam( String paramName, String value )
    {
        if ( _queryString == null )
        {
            _queryString = new InternalStringBuilder( "?" );
        }
        else
        {
            _queryString.append( '&' );
        }
        
        _queryString.append( paramName );
        
        if ( value != null )
        {
            _queryString.append( '=' ).append( value );
        }
    }
1101968
public Parameters append(String key, String value) {
        if (nameValuePairs == null) {
            nameValuePairs = new ArrayList<NameValuePair>();
        }
        nameValuePairs.add(new BasicNameValuePair(key, value));
        return this;
    }
335191
public void addHeader(String key, String value) {
        if (key.equals("As-User")) {
            for (int i = 0; i < this.headers.size(); i++) {
                if (this.headers.get(i).getKey().equals("As-User")) {
                    this.headers.remove(i);
                }
            }
        }
        if (key.equals("X-Box-UA")) {
            throw new IllegalArgumentException("Altering the X-Box-UA header is not permitted");
        }
        this.headers.add(new RequestHeader(key, value));
    }
700993
public void addOAuthParameter(String key, String value) {
        oauthParameters.put(checkKey(key), value);
    }
1207330
public void setRequestProperty(String key, Object value) {
		if (value != null) {
			if (requestProperties == null) {
				requestProperties = new HashMap<>();
			}
			requestProperties.put(key, value);
		}
	}
1303313
public void add(final Param key, final String value) {
        if (StringUtils.isNotBlank(value)) {
            parameters.put(key, value);
        }
    }
1089570
public URIBuilder queryParam(String name, String value) {
		parameters.add(name, value);
		return this;
	}
938020
public QueryParameterWrap addParameter(String name, Object value) {
		this.namedParameter.put(name, value);
		return this;
	}
135574
function setURLParameter(url, key, value) {
  if(typeof url !== 'string') {
    throw new Error('URLs must be a string');
  }

  if(urlUtils) {
    //node.js
    url = urlUtils.parse(url);

    url.search = ((url.search) ? url.search + '&' : '?') + key + '=' + value;

    url = urlUtils.format(url);
  }
  else {
    //browser
    url = url.split('?');

    url[1] = ((url[1]) ? url[1] + '&' : '') + key + '=' + value;

    url = url.join('?');
  }

  return url;
}
868964
public void put(final String key, final String value) {
        if (value == null) {
            throw new IllegalArgumentException("No value provided for key " + key);
        }
        validate(key, value);
        data.putValue(key, value);
    }
750594
public void addParam(String name, String value) {
        if (name == null) {
            throw new NullPointerException("name");
        }
        if (value == null) {
            throw new NullPointerException("value");
        }
        params.add(new Param(name, value));
    }
1196433
private void addQueryParams(final Request request) {
        if (status != null) {
            request.addQueryParam("Status", status.toString());
        }

        if (phoneNumber != null) {
            request.addQueryParam("PhoneNumber", phoneNumber.toString());
        }

        if (incomingPhoneNumberSid != null) {
            request.addQueryParam("IncomingPhoneNumberSid", incomingPhoneNumberSid);
        }

        if (friendlyName != null) {
            request.addQueryParam("FriendlyName", friendlyName);
        }

        if (uniqueName != null) {
            request.addQueryParam("UniqueName", uniqueName);
        }

        if (getPageSize() != null) {
            request.addQueryParam("PageSize", Integer.toString(getPageSize()));
        }
    }
823353
protected function addOptionalQueryParam(array &$queryParameters, $key, $value)
    {
        Validate::isString($key, 'key');
        Validate::isString($value, 'value');

        if (!is_null($value) && Resources::EMPTY_STRING !== $value) {
            $queryParameters[$key] = $value;
        }
    }
766433
public HttpClientRequestActionBuilder queryParam(String name, String value) {
        httpMessage.queryParam(name, value);
        return this;
    }