I am writing a REST client for CouchDB in Java. The following code should be quite standard:
this.httpCnt.connect(); Map respon
You need to check for the http status using getResponseCode() to decide if you should use getInputStream() or getErrorStream(). In this case, you need to read the error stream.
getResponseCode()
getInputStream()
getErrorStream()