accessing http://demo5.traccar.org/api/positions/ by the browser will throw
ERR_INVALID_RESPONSE
accessing http://demo5.traccar.org/api/positions/ by a REST Client with header
Content-Type: application/json
Accept: *
authorization: Basic "some_token"
will throw
Manager access required - SecurityException (PermissionsManager:158 < *:270 < PositionResource:76 < ...)
Also tried in a personal VPS, same request with admin user in REST Client and threw NullPointerException. All worked in the previous version. ¿Any ideas?
Your accept header is wrong. You should use application/json
.
Header
Content-Type: application/json
Accept: application/json
authorization: Basic "some_token"
did the trick. Is there a logic reason to force us to put that header? It wasn't necessary in previous versions. Is it necessary for being REST?
Thank you Anton for the answer and for this amazing application.
It was necessary in previous version as well, but it can randomly work without it.
accessing http://demo5.traccar.org/api/positions/ by the browser will throw
accessing http://demo5.traccar.org/api/positions/ by a REST Client with header
will throw
Also tried in a personal VPS, same request with admin user in REST Client and threw NullPointerException. All worked in the previous version. ¿Any ideas?