add option to disable TLS certificate validation in http_client

This commit is contained in:
2025-10-21 01:30:54 -04:00
parent 3ec0f2ab4f
commit 8c513ac738
2 changed files with 7 additions and 3 deletions

View File

@@ -304,6 +304,7 @@ class http_client:
headers: dict = {},
authorize: bool = True,
json: dict = {},
verify: bool = True,
):
resolved = self._resolve(destination)
@@ -321,7 +322,8 @@ class http_client:
f"{resolved.base_url}{path}",
headers=headers,
extensions={"sni_hostname": resolved.sni},
json=json
json=json,
verify=verify,
)
def get(
@@ -330,6 +332,7 @@ class http_client:
destination: str,
headers: dict = {},
authorize: bool = True,
verify: bool = True,
):
resolved = self._resolve(destination)
@@ -345,7 +348,8 @@ class http_client:
return self.http.get(
f"{resolved.base_url}{path}",
headers=headers,
extensions={"sni_hostname": resolved.sni}
extensions={"sni_hostname": resolved.sni},
verify=verify,
)