Garmin changed the upload endpoint and added some random headers

Cribbed from cpfair/tapiriik:

    51226cc012
This commit is contained in:
Daniel Lenski 2017-12-21 16:09:33 -08:00
parent aaed3f44bb
commit d410a7c212

View File

@ -372,8 +372,8 @@ class GarminClient(object):
# upload it # upload it
files = dict(data=(fn, file)) files = dict(data=(fn, file))
response = self.session.post("https://connect.garmin.com/proxy/upload-service-1.1/json/upload/.{}".format(format), response = self.session.post("https://connect.garmin.com/modern/proxy/upload-service/upload/.{}".format(format),
files=files) files=files, headers={"nk": "NT"})
# check response and get activity ID # check response and get activity ID
if response.status_code != 200: if response.status_code != 200: