Nadia Guerras created OLTU-207: ---------------------------------- Summary: Error in responseCode Key: OLTU-207 URL: https://issues.apache.org/jira/browse/OLTU-207 Project: Apache Oltu Issue Type: Bug Components: oauth2-client Affects Versions: oauth2-1.0.2 Reporter: Nadia Guerras
I'm using the api and I am having problems with responseCode in URLConnectionClient, if ((responseCode == 400) || (responseCode == 401)) inputStream = httpURLConnection.getErrorStream(); else { inputStream = httpURLConnection.getInputStream(); } If responseCode=500 then I have to use httpURLConnection.getErrorStream(); Can we use something like this:? if (httpConn.getResponseCode() >= 400) { _is = httpConn.getInputStream(); } else { /* error from server */ _is = httpConn.getErrorStream(); } There are other frameworks that ask if httpConn.getErrorStream()!=null. -- This message was sent by Atlassian JIRA (v6.4.14#64029)