Re: How to capture HTTP response with the status 500?

2017-01-16 Thread Al Le
> So maybe it's because of the inbuilt JDK's implementation of > connection.getInputStream (it throws an exception if the status is 500). I've debugged it and found out that the connection object is of type 'sun.net.www.protocol.https.HttpsURLConnectionImpl' which delegates the getInputStream()

Re: How to capture HTTP response with the status 500?

2017-01-16 Thread Al Le
Jan, thank you for taking time! Am 16.01.2017 um 08:27 schrieb Jan Matèrne (jhm): Otherwise the return of the url.openConnection().getInputStream() is copied to local file. So a response for a 500-error should be captured to file. _But_ that file is deleted if an error (non-success, e.g. catc