You need to read status before reading the body. If status >= 400, you need to call `getErrorStream()` rather than `getInputStream`