One of my interceptors contains the following code:
intercept(request, next) {
const _id = 1
const _token = "foo"
return next.handle(request.clone({
setParams: {
user_id: _id,
user_token: _token
}
});
}
I recently observed that instead of using setParams
, there is a params
field being used?
Upon reviewing the Angular website documentation for the HttpRequest
class, I could not find any information related to this change. While it showed both fields existed, no details were provided.
Could it be possible that params
acts as a hard override while setParams
allows for the addition of extra Key->Value
pairs to the request?