0

I am trying to send HTTP POST to traccar from a python application. How can i use requests to send it in the following format (osmand):

http://demo.traccar.org:5055/?id=123456&lat={0}&lon={1}&timestamp={2}&hdop={3}&altitude={4}&speed={5}

Requests post syntax= requests.post(url, params={key: value}, args)

It works great when i use cURL.

Any one having any ideas?

Thanks

andy
  • 11
  • 3

1 Answers1

1

For POST you should use body instead of query parameters. You should be able to send it with something like this

requests.post('http://demo.traccar.org:5055', data = {'lat': y, 'lon': x})
Anton Tananaev
  • 2,458
  • 1
  • 25
  • 48