diff --git a/qingstor/sdk/unpack.py b/qingstor/sdk/unpack.py index 93166c4..844699e 100644 --- a/qingstor/sdk/unpack.py +++ b/qingstor/sdk/unpack.py @@ -51,7 +51,7 @@ def unpack_response_body(self): # In other situations, body should not be unpacked for possibly large memory usage if not ( self.res.ok and - self.res.headers["Content-Type"] != "application/json" + self.res.headers.get("Content-Type") != "application/json" ): try: data = self.res.json()