Why does Gps Tracker use GET instead of POST?

December 5th, 2014 | Nick Fox

When the phone clients send gps data to the website to be stored in the database, you’ll notice that all of the clients use the Http GET method instead of POST. Most experienced developers would look at that and immediately think it was a mistake and I am one of them. GET is used to get data such as getting a list or getting user data and POST is used to add a new item to a collection or in the case of Gps Tracker, adding a new row of gps data to the database.

But there’s one important difference between GET and POST that I am taking advantage of. GET requests are sent in the URL string while POST requests are sent as part of the Http message body. I get quite a lot of requests for help in setting up Gps Tracker and the easiest way to debug setup problems is to open up a browser and send data to their website by pasting a URL like this:


If I were trying to debug Gps Tracker using POST, I would have to use a tool like curl or wget from the command line to send the data to the website. It’s a lot more work for me to ask people to use curl or wget instead of just pasting the URL into their browser and that’s the reason why Gps Tracker uses GET.

But generally speaking, you should be using POST when you are adding new rows to a database.