Когда я делаю запросы на скручивание с помощью Flask, все в порядке:
Без TLS:
Код: Выделить всё
curl -X POST -H "Content-Type: application/json" -d '{"method": "account.auth"}' http://X.X.X.X:5050/
{"error":0,"result":{"token":"XXX"}}
Код: Выделить всё
curl -X POST -H "Content-Type: application/json" -d '{"method": "account.auth"}' https://example.com:8443/api/
{"error":0,"result":{"token":"XXX"}}
Без TLS:
Код: Выделить всё
curl -X POST -H "Content-Type: application/json" -d '{"method": "account.auth"}' http://X.X.X.X:5050/
{"error":0,"result":{"token":"XXX"}}
Код: Выделить всё
curl -X POST -H "Content-Type: application/json" -d '{"method": "account.auth"}' https://example.com:8443/api/
Unsupported upgrade request.
Подробнее здесь: https://stackoverflow.com/questions/666 ... st-request