public String generateRequestUrl() throws Exception
	{
		int i = 0;
		StringBuilder commandString = new StringBuilder();

		commandString.append("apiKey=").append(apiKey);
		commandString.append("&").append("command=").append(command);

		Map<String, String> paramsLowerCase = new HashMap<String, String>();
		paramsLowerCase.put("apiKey".toLowerCase(), apiKey.toLowerCase());
		paramsLowerCase.put("command".toLowerCase(), command.toLowerCase());

		List<String> fields = new ArrayList<String>();
		fields.add("apiKey".toLowerCase());
		fields.add("command".toLowerCase());

		for (Map.Entry<String, String> e : params.entrySet())
		{
			commandString.append("&");

			String field = e.getKey();
			String value = e.getValue();

			commandString.append(encodeUrl(field)).append("=").append((value));

			paramsLowerCase.put(field.toLowerCase(), value.toLowerCase());
			fields.add(field.toLowerCase());
			i++;
		}

		Collections.sort(fields);

		StringBuilder signatureData = new StringBuilder();

		for (String s : fields)
		{
			if (signatureData.length() != 0)
			{
				signatureData.append("&");
			}

			signatureData.append(s).append("=").append(paramsLowerCase.get(s));
		}

		String signature = calculateRFC2104HMAC(signatureData.toString().toLowerCase(), secretKey);

		return apiUrl + commandString.toString() + "&signature=" + encodeUrl(signature);
	}