Code example for URLConnection

Methods: setRequestProperty

0
	 */ 
	private URLConnection connect(String surl) throws MalformedURLException, IOException
	{ 
		URL url = new URL(surl);
		URLConnection conn = url.openConnection();
		conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded;charset=" + CHARSET);
		conn.setRequestProperty("User-Agent", "DH Manager by Andreas H. and Michael V.");
		conn.setRequestProperty("Cookie", DUALIS_COOKIE);
		return conn;
	} 
 
	/** 
	 * Generiert einen zufälligen cookie 
	 *  
	 * @return Cookie 
	 */ 
	private static String generateCookie()
	{ 
		String cookie = "";
		StringBuilder stringBuilder = new StringBuilder();
		for (int i = 0; i < 16; i++)