Here is the code snippet I am working with:
var req = {
method: 'POST',
url: '/customer',
headers: {
'Content-Type': 'application/json'
},
data: { test: 'testvalue' }
};
$http(req).then(function(){
console.log("f1")
},function(){
console.log("f2")
});
The provided code results in this output after posting:
{ '{"test":"testvalue"}': '' }
However, the desired output should be like this:
{"test":"testvalue"}
If anyone knows how to solve this issue, please share your solution. Thank you!