public static Bitmap getImage(String address) throws Exception { Bitmap imgmap = null; InputStream is = null; URL url = new URL(address); HttpURLC
Thats because the function setRequestMethod() has to be called before the connection is made. Check this link
setRequestMethod()
http://developer.android.com/reference/java/net/HttpURLConnection.html#setRequestMethod(java.lang.String)
So better call it before openConnection(). Or dont call it at all.