Refactoring $http request params

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

1 Like

You want to set an http function in the factory ?