import urllib.request
import json

req = urllib.request.Request("http://127.0.0.1:5000/chat", headers={'Content-Type': 'application/json'})
data = json.dumps({"message": "asdsadsadasdasd", "locale": "en"}).encode('utf-8')
try:
    with urllib.request.urlopen(req, data=data) as response:
        print(response.read().decode())
except Exception as e:
    print(e)
