I have this curl call to a local graphhopper server which works:
curl -XPOST -H "Content-Type: application/gpx+xml" -d @home/jd/test1.gpx "localhost:8989/match?vehicle=car&type=json"
I now want to automate this call in python and got the following so far:
import requests
url = 'http://localhost:8989/match'
headers = {'Content-Type': "application/gpx+xml"}
files = {'upload_file': open('home/jd/test1.gpx','rb')}
values = {'vehicle': 'car', 'type': 'json'}
r = requests.post(url, files=files, data=values, headers=headers)
print (r.status_code)
print (r.raise_for_status())
I get a Bad Request for URL http://localhost:8989/match
what am I missing here?