Closed woshichuanqilz closed 1 year ago
http: https: ssl error.
def LocalRestApiTest(): import requests url = 'http://127.0.0.1:27123/commands/' headers = { 'accept': 'application/json', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-US;q=0.7,ja;q=0.6,zh-TW;q=0.5', 'Authorization': 'Bearer xxx', 'Connection': 'keep-alive', 'Content-Type': 'application/json; charset=utf-8', 'Host': '127.0.0.1:27123', } response = requests.get(url, headers=headers, verify=False) print('test')
Response is 502.
So why this happened and how to solve it?
It is worked when I use the web test.
But I get error when using curl in terminal. Show nothing when use curl.
http: https: ssl error.
Python script also wont work
Response is 502.
So why this happened and how to solve it?