Hi,
I’m trying to pull some data over REST API of our managed Dynatrace cluster(1.196.80.20200709-090917). I’m using Python (3.6.8) and Requests (2.23.0) library.
I’m able to get the problem feed with the curl command below, but it fails with Python.
I even installed requests_debugger module and printed out the corresponding curl command, and it prints a successful curl command, however it fails when i run the Python script.
Can you please help?
I tried to run the same script on the cluster node, it failed again.
1st trial:
2nd trial: (the only diff is r = requests.get(url, headers={ ‘Authorization’: ’ Api-Token gNePSMwLQVSKZeLEOPkx4’ }) with a leading space in ’ Api-Token…’ I do it to reproduce the same curl command which works.
I tried also other combinations, none of them worked. As you can see the curl command at the last line gets HTTP 200 with the problem feed in his response.
requests library doesn’t let the leading space for security reasons. What can i do, i want to use both (python and requests, it is easy.)

