import requests
xml = """<?xml version='1.0' encoding='utf-8'?>
<a>б</a>"""
headers = {'Content-Type': 'application/xml'}
print(requests.post('http://httpbin.org/post', data=xml, headers=headers).text)
How can I send an xml body using requests library?