From af7acde251cc870fb05ecba84aad9fe30eaa6616 Mon Sep 17 00:00:00 2001 From: lilydjwg Date: Sat, 30 Nov 2024 16:42:57 +0800 Subject: [PATCH] httpx_httpclient: pass None when params is empty see https://github.com/encode/httpx/discussions/3428 --- nvchecker/httpclient/httpx_httpclient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvchecker/httpclient/httpx_httpclient.py b/nvchecker/httpclient/httpx_httpclient.py index 6604727..412eccb 100644 --- a/nvchecker/httpclient/httpx_httpclient.py +++ b/nvchecker/httpclient/httpx_httpclient.py @@ -49,7 +49,8 @@ class HttpxSession(BaseSession): method, url, json = json, content = body, headers = headers, follow_redirects = follow_redirects, - params = params, + # httpx checks for None but not () + params = params or None, ) err_cls: Optional[type] = None if r.status_code >= 500: