[mod] conf:use "scheme" instead of "protocol"
This commit is contained in:
parent
72192ed2bf
commit
cb6c430d45
|
|
@ -1,13 +1,13 @@
|
||||||
_conf_data = {
|
_conf_data = {
|
||||||
"url": {
|
"url": {
|
||||||
"test": {
|
"test": {
|
||||||
"protocol": "https",
|
"scheme": "https",
|
||||||
"host": "api.ote.domrobot.com",
|
"host": "api.ote.domrobot.com",
|
||||||
"port": 443,
|
"port": 443,
|
||||||
"path": "jsonrpc/"
|
"path": "jsonrpc/"
|
||||||
},
|
},
|
||||||
"production": {
|
"production": {
|
||||||
"protocol": "https",
|
"scheme": "https",
|
||||||
"host": "api.domrobot.com",
|
"host": "api.domrobot.com",
|
||||||
"port": 443,
|
"port": 443,
|
||||||
"path": "jsonrpc/"
|
"path": "jsonrpc/"
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ def http_call(
|
||||||
{
|
{
|
||||||
"http": (lambda: _http_client.HTTPConnection(request["url"]["host"], request["url"]["port"])),
|
"http": (lambda: _http_client.HTTPConnection(request["url"]["host"], request["url"]["port"])),
|
||||||
"https": (lambda: _http_client.HTTPSConnection(request["url"]["host"], request["url"]["port"])),
|
"https": (lambda: _http_client.HTTPSConnection(request["url"]["host"], request["url"]["port"])),
|
||||||
}[request["url"]["protocol"]]
|
}[request["url"]["scheme"]]
|
||||||
)()
|
)()
|
||||||
connection.request(
|
connection.request(
|
||||||
request["method"],
|
request["method"],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue