This line can be part of the previous block with just a check for `res.headers['Content-Type'] and res.body.length > 0`.