I am trying to call one Spring boot REST API from Angular component and trying to display the result string by using alert(). When I am trying to display, it is giving the error
message: "Unexpected token P in JSON at position 0"
The result of this API is successfully giving back the string "Permission Updated Successfully" at Postman.
MY component code is like the following in my .ts file,
this.manageuserService.modifyUserPermissionApiMethod(this.modificationObj)
.subscribe((data:any)=> {alert(data);});
Where have I gone wrong in implementing this?