I have a
String url = "/rest/devices/{{deviceId}}";
in which {{deviceId}}
value i want to replace with some deviceId.
url.replace("{{deviceId}}", device.getId());
But it's not working.
Therefore, What to do?
I have a
String url = "/rest/devices/{{deviceId}}";
in which {{deviceId}}
value i want to replace with some deviceId.
url.replace("{{deviceId}}", device.getId());
But it's not working.
Therefore, What to do?
I guess you are missing an assignment and result of
url.replace("{{deviceId}}", device.getId());
is ignored.
What about:
url = url.replace("{{deviceId}}", device.getId());