public BTURL(String loc, String ...params) throws Exception {
		if((params.length % 2) != 0) {
			throw new Exception("Parameters should be key, value array, length is not divisible by 2");
		}
		String	p = "";
		if(params.length > 0) {
			p += "?";
			
			for (int i  = 0; i  < params.length; i += 2) {
				if(params[i+1].indexOf("NOENCODE:") != -1) {
					p += params[i] + "=" + params[i+1].substring("NOENCODE:".length()) + "&";
				} else {
					p += params[i] + "=" + URLEncoder.encode(params[i+1], "UTF-8") + "&";
				}
				
			}
			
			p = p.substring(0, p.length() - 1);
		}
		
		url = new URL(loc + p);
		
		if(loc.indexOf("https") != -1) {
			System.out.println("using https conn");
			conn = (HttpsURLConnection)url.openConnection();
		} else {
			conn = (HttpURLConnection)url.openConnection();
		}
		
		//
		conn.setUseCaches(false);
	}