Refactoring $http request params


#1

I like to set default params to $http service. googled about it havent got any relevent answers.

all the requests in my app has common params

example:
$http({
url: ‘…blah’,
method: ‘GET or any http verb’,
params: {no: ‘xxx’, token: ‘xxx’}
})

we can set default headers by using $httpProvider.defaults
is there any way to set default params for $http service like we set default headers


#2

You want to set an http function in the factory ?