I wish to send a particular data in all the $http calls. Can i define it somewhere so that i need not alter all the $http calls. For example,
$http({
method: 'POST',
url: serviceUrl,
data: {
"key1": data1,
"key2": data2,
}
})
Add a data3 as default in all my $http calls. Thanks in advance for your response.
You can transform or intercept the $http object with $httpProvider
I've never tried to append the POST data like this, but it should work.
For GET params transforming...