@Override
	public CommandResponse executeCommand(RequestType requestType, List<Pair<String,String>> headers, String commandName, Object commandParameters, Class<?> responseCastClass){
		
		System.out.println();
		System.out.println(commandName);
		CommandResponse serverResponse = null;
		String translatedJson = jsonTrans.translateTo(commandParameters);
		
		try {
			URL url = new URL("http://" + Host + ':' + Port + "/" + commandName);
			HttpURLConnection connection = (HttpURLConnection)url.openConnection();
			for(Pair<String, String> header : headers){
				System.out.println("Header: " + header.getKey() + " = " + header.getValue());
				connection.addRequestProperty(header.getKey(), header.getValue());
			}
			if(requestType.name().equals("GET")) {
				
				serverResponse = doGet(connection, responseCastClass); //will take the translated json object and the parameters and send a request to the server. 
			}
			else {
				serverResponse = doPost(translatedJson, connection, responseCastClass);
			}	
		}
		catch (IOException e) { // IO ERROR
			System.err.print("Unable to establish URL connection!");
			e.printStackTrace();
		}
		return serverResponse;
	}