forward.url - does not send data

Eugene4 years ago

Please tell me what I'm doing wrong. I need to send data JSON to the website, I tried different settings, but the data is not sent. Where did I make a mistake?

<entry key='forward.enable'>true</entry>                                                                                
<entry key='forward.url'>http://itorg.pp.ua/?id={uniqueId}</entry>                                                      
<entry key='forward.json'>true</entry>
Anton Tananaev4 years ago

You can't have query parameter placeholders if you use json option.

Eugene4 years ago

Thanks for the help. I fixed a configuration error. Now the configuration looks like this:

<entry key='forward.enable'>true</entry>
<entry key='forward.url'>http://itorg.pp.ua/?id={uniqueId}</entry>
<entry key='forward.json'>false</entry>

After the correction, I restarted the service, but still the server does not transmit data to the specified address :(

Dejan Gambin4 years ago

Hi,

I have the same problem. Data seems like it doesn't come, but indeed it comes and format is the problem in my receiving application (not valid although it is a valid json). My config is the same, so like:

    <entry key='forward.enable'>true</entry>
    <entry key='forward.url'>http://52.208.22.106/api/xy</entry>
    <entry key='forward.json'>true</entry>

And the problematic json is:

{"id":0,"attributes":{"priority":1,"sat":8,"event":0,"ignition":false,"motion":false,"rssi":5,"io200":0,"gpsStatus":1,"di1":0,"pdop":0.8,"hdop":0.7000000000000001,"power":12.493,"battery":8.072000000000001,"io68":0,"operator":21910,"io16":34436,"distance":0.0,"totalDistance":5.907105557E7},"deviceId":1,"type":null,"protocol":"teltonika","serverTime":"2019-10-24T10:27:27.529+0000","deviceTime":"2019-10-24T10:27:23.000+0000","fixTime":"2019-10-24T10:27:23.000+0000","outdated":false,"valid":true,"latitude":44.8768516,"longitude":13.86638,"altitude":35.0,"speed":0.0,"course":0.0,"address":null,"accuracy":0.0,"network":null}