We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98cab4d commit eba905fCopy full SHA for eba905f
pydruid/client.py
@@ -15,6 +15,7 @@
15
#
16
import json
17
import re
18
+import ssl
19
import urllib
20
from base64 import b64encode
21
@@ -43,6 +44,12 @@ def set_proxies(self, proxies):
43
44
opener = urllib.request.build_opener(proxy_support)
45
urllib.request.install_opener(opener)
46
47
+ def set_cert_chain(self, certfile, keyfile=None, password=None):
48
+ context = ssl.create_default_context()
49
+ context.load_cert_chain(certfile, keyfile, password)
50
+ handler = urllib.request.HTTPSHandler(context=context)
51
+ urllib.request.install_opener(handler)
52
+
53
def _prepare_url_headers_and_body(self, query):
54
querystr = json.dumps(query.query_dict).encode("utf-8")
55
if self.url.endswith("/"):
0 commit comments