Code example for HttpURLConnection

Methods: getResponseMessage, setConnectTimeout, setReadTimeout, setRequestMethod

0
		return responseCode;
	} 
	 
	public String getResponseMessage() throws IOException {
		connect(); 
		return this.connection.getResponseMessage();
	} 
	 
	public int getHeaderFieldInt(String name, int def) throws IOException {
		connect(); 
		return this.connection.getHeaderFieldInt(name, def);
	} 
 
	public long getHeaderFieldDate(String name,	long def) throws IOException {
		connect(); 
		return this.connection.getHeaderFieldDate(name, def);
	} 
 
	public String getHeaderFieldKey(int n) throws IOException {
		connect(); 
		return this.connection.getHeaderFieldKey(n);