diff --git a/app/utils/http.py b/app/utils/http.py index c647046e..6ca594c9 100644 --- a/app/utils/http.py +++ b/app/utils/http.py @@ -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,