Solution to java.io.IOException: Server returned HTTP response code: 400 for URL

The error reported

Accident code

The cause of the accident

Solutions

Summary

Looking at the source code, my above implementation is not good. If the response code returned is less than 400 but not 200, geterrorstream will return null, so the specific and perfect solution needs to be explored slowly

Similar Posts: