Using the request liberally I would like convert my POST request from Postman to the Python function. My currently code returns "('Invoice must be in xml format', 400)" . I'm not shore if I should add the following keys: Content-Length and Host. If yes, how to calculate these values in the header?
Postman requests

My Python code
import requests
url3 = 'http://xxx.azure.com/xxx/api/file'
file = 'ok/test_file.xml'
headers = {'Token': 'xxx',
'Content-Type': 'application/xml'}
body = {'Tags': 'python',
'ExternalTrackingId': '1-python',
'FastTrack': False,
'RequiresBatchSend': True,
'file.xml': (open(file, 'rb'), 'text/xml')}
def send_invoice():
send_file = requests.post(url3, headers=headers, data=body)
return send_file.text, send_file.status_code
print(send_invoice())
Response
('File must be in xml format', 400)
How to improve my code to correctly send the XML file to the API?

In postman you can inspect your request and read the code request with almost all languages including python requests.