elementapi 0.5__tar.gz → 0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {elementapi-0.5 → elementapi-0.7}/PKG-INFO +1 -1
- {elementapi-0.5 → elementapi-0.7}/elementapi/__init__.py +11 -4
- {elementapi-0.5 → elementapi-0.7}/elementapi.egg-info/PKG-INFO +1 -1
- {elementapi-0.5 → elementapi-0.7}/setup.py +1 -1
- {elementapi-0.5 → elementapi-0.7}/elementapi.egg-info/SOURCES.txt +0 -0
- {elementapi-0.5 → elementapi-0.7}/elementapi.egg-info/dependency_links.txt +0 -0
- {elementapi-0.5 → elementapi-0.7}/elementapi.egg-info/requires.txt +0 -0
- {elementapi-0.5 → elementapi-0.7}/elementapi.egg-info/top_level.txt +0 -0
- {elementapi-0.5 → elementapi-0.7}/setup.cfg +0 -0
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
try:
|
|
2
|
-
import
|
|
3
|
-
except:
|
|
4
|
-
|
|
2
|
+
import orjson as json
|
|
3
|
+
except ImportError:
|
|
4
|
+
try:
|
|
5
|
+
import ujson as json
|
|
6
|
+
except:
|
|
7
|
+
import json
|
|
5
8
|
|
|
6
9
|
import logging
|
|
7
10
|
import re
|
|
@@ -76,7 +79,8 @@ class ElementAPI:
|
|
|
76
79
|
sync=False,
|
|
77
80
|
proxies=None,
|
|
78
81
|
custom_ca=None,
|
|
79
|
-
https_no_verify=False
|
|
82
|
+
https_no_verify=False,
|
|
83
|
+
override_hostname=None
|
|
80
84
|
):
|
|
81
85
|
if baseurl:
|
|
82
86
|
self.baseurl = baseurl
|
|
@@ -103,6 +107,9 @@ class ElementAPI:
|
|
|
103
107
|
self.custom_ca = custom_ca
|
|
104
108
|
self.https_no_verify = https_no_verify
|
|
105
109
|
|
|
110
|
+
if override_hostname:
|
|
111
|
+
self.headers['Host'] = "%s:%s" % (override_hostname, port)
|
|
112
|
+
|
|
106
113
|
self.requestargs = {
|
|
107
114
|
'headers': self.headers,
|
|
108
115
|
'proxies': self.proxies
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|