NullPointerException when creating new device using osmAnd

sorb3 years ago

I'm using postman I'm able to login and able to get devices using get. But when I try to create device using POST /api/devices I get this error message NullPointerException (DataManager: 437 < BaseObjectManager: 123 < BaseObjectResource: 106 < ...)

My postman code looks like this

var config = {
  method: 'post',
  url: 'http://localhost:8082/api/devices?name=test&uniqueId=124415125rqw',
  headers: { 
    'Content-Type': 'application/json',
  }
};

Don't know why its not working

sorb3 years ago

Found it. It should be under body and raw JSON