I am using angular js and making a restcall. But I have one variable and this variable have some value when I put this variable in service then this variable value encoded in console.
REST CALL
var rep = "CX-0138_ES48A9CA";
Rh.all('example/demo/db ').post(" ",+JSON.stringify(rep)).then(function(resp)
{
})
then rep value is not exist in console url.
But when I removed +JSON.stringify then service(url) encoded.
var rep = "CX-0138_ES48A9CA";
Rh.all('example/demo/db ').post(" ",rep).then(function(resp)
{
})
How can set value of rep CX-0138_ES48A9CA in post method.
Try this:
Rh.all('example/demo/db ').post({rep: encodeUriComponent(rep)}).then(function(resp)
{
})