url = 'http://localhost:8080'
data = {'sender': 'Alice', 'receiver': 'Bob', 'message': 'We did it!'}
headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
Опубликовать JSON с помощью запросов Python