I got an url and a some header-data - which, so I've been told, are necessary:
url = "sample_url"
Content-Type: application/xml;charset=UTF-8
Accept: application/xml;charset=UTF-8
With the sample-url I want to create a GET request and receive xml-data via python but don't know which is currently the best way to do that!
Might someone give me advice or example?
Try using requests library:
url = 'sample_url'
headers = {'Content-Type': 'application/xml;charset=UTF-8', 'Accept': 'application/xml;charset=UTF-8'}
r = requests.get(url, headers=headers)
xml = r.text