From 5eaba95fa35321afb25935dc1ac6d9cd07c6be4d Mon Sep 17 00:00:00 2001 From: ahmed hanafy Date: Tue, 5 Mar 2024 11:42:53 +0200 Subject: [PATCH] add 'Connection':'close' to the request when multiple requests are made in row there is a spike in ram on the server. this is a try to solve this problem --- woocommerce/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/woocommerce/api.py b/woocommerce/api.py index a97c901..fc6cf04 100644 --- a/woocommerce/api.py +++ b/woocommerce/api.py @@ -70,7 +70,8 @@ def __request(self, method, endpoint, data, params=None, **kwargs): auth = None headers = { "user-agent": f"{self.user_agent}", - "accept": "application/json" + "accept": "application/json", + "Connection":"close" } if self.is_ssl is True and self.query_string_auth is False: