AutoCloseResponse支持上下文管理协议,避免部分插件报错

This commit is contained in:
景大侠
2025-07-03 18:38:48 +08:00
parent 52ef390464
commit 6c02766000

View File

@@ -80,6 +80,12 @@ class AutoCloseResponse:
for name, value in state.items():
setattr(self, name, value)
def __enter__(self):
return self
def __exit__(self, *args):
self.close()
class RequestUtils:
def __init__(self,