Code example for HttpHead

0
	public static HttpResponse getHeaders(String url, String authUser, String authPass, HttpClient client)
	{ 
		HttpResponse response = null;
		try 
		{ 
			HttpHead request = new HttpHead(url);
			addBasicAuthHeader(request, authUser, authPass);
		    response = client.execute(request);
		} 
		catch(Exception ex) { }
		return response;
	} 
	 
	/** 
	 * Gets the underlying stream from an HttpResponse object 
	 * @param url - The address of the resource 
	 * @param context - Context such as an activity or application context for retrieving the single instance HttpClient of the app 
	 * @return InputStream object 
	 */ 
	public static InputStream getInputStream(String url, HttpClient client)
Experience pair programming with AI  Get Codota for Java