public HttpRequest(String url, Map<String, String> params) {
        if (url == null) {
            throw new RuntimeException("Request URL cannot be null");
        }
        this.url = url;
        if (params != null) {
            this.url += "?" + urlEncode(params);
        }
    }