Sending data to Geoevent server

Philippe De Pol5 years ago

Hello,

I am using the Android client, and i would like to send data to a Geoevent server. Geoevent is an extension of the Arcgis server which is made to process realtime data. I created inside Geoevent a Rest input endpoint. When i use this endpoint inside the android client, the server doesn't seem to receive the data. I know for sure the the end point is reachable. Do you know if it is possible to use Geoevent as a server ?

Anton Tananaev5 years ago

I'm assuming it's expecting completely different format, so you would probably have to modify the client.

Philippe De Pol5 years ago

Ok, i've found the problem with the Android client : it uses the POST method. I modified the Android client source with the GET method and it works. Goevent receives correctly the data. If the POST method is used, Geoevent expects the data to be sent with the body, but it's not the case as the parameters are sent within the url with a query string.
So in this case, why use a POST method ?

Anton Tananaev5 years ago

POST method is used because it is more appropriate for uploading data and it allows us to forward the data when people use Traccar web port.

Emmanuel5 years ago

Hello,

The problem is the parameters are sent in the URL (as a GET request) and a POST request is used by Traccar client. As the body is empty our product fails.

Do you think is it possible to modifiy Traccar client to use POST method and put the parameters in the body ? Or to have the choice to choose the method in configuration ?

Thanks a lot

Anton Tananaev5 years ago

Feel free to send a pull request if you want to move parameters to the body. I agree that it's probably more appropriate.

Emmanuel5 years ago

OK. We will provide a pull request for Android
For IOS it will be more difficult for us.

How many time it takes for you to integrate the code in the stable release ?

Anton Tananaev5 years ago

Can't guarantee any specific time. We would need both iOS and Android to be consistent, especially with such important thing as communication protocol.

Philippe De Pol5 years ago

Ok, i've done the pull request for Android : https://github.com/traccar/traccar-client-android/pull/415
I've tested the modified version on my Android phone.