class HttpRequest {

    public HttpRequest addParameter(String name, String value) {
        checkNotNull(name, "name");
        checkNotNull(value, "value");

        final List<String> oldValues = parameters.containsKey(name) ? parameters.get(name) : new ArrayList<String>();
        final List<String> newValues = new ArrayList<>(oldValues);
        newValues.add(value);
        final Map<String, List<String>> params = new HashMap<>(parameters);
        params.put(name, newValues);

        return new HttpRequest(requestURL, params, queryString);
    }

    @Deprecated public  HttpRequest(String requestURL);
    public  HttpRequest(String requestURL, String queryString);
    @Deprecated public  HttpRequest(String requestURL, Map<String, List<String>> parameters);
    public  HttpRequest(String requestURL, Map<String, List<String>> parameters, String queryString);

}