class HttpRequestBuilder {

    public String getUrlAndPath() {
        String temp = url;
        if (paths == null) {
            if (!temp.endsWith("/")) {
                temp = temp + "/";
            }
            return temp;
        }
        for (String path : paths) {
            if (path.startsWith("/")) {
                path = path.substring(1);
            }
            if (!temp.endsWith("/")) {
                temp = temp + "/";
            }
            temp = temp + path;
        }
        return temp;
    }

}