You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like this parameters to be applied on every request. However, there are other parameters I need to apply specific to a request. For those requests I specify a new parameters object and the ones from the registration get overwritten.
I would like HttpService to either merge the params object specified during module registration, or have some sort of config option to indicate that params need to be merged.
What is the motivation / use case for changing the behavior?
Have the ability to have parameters in one place that will apply to all requests in a particular service. This makes it easy so that if a parameter needs to be added for all requests, it can be done in one place instead of updating each request in a service.
Use the defaults setup and then allow the config to override them. This is one way to do it, but could lead to unintended behavior if that's not what people are expecting. The other approach would be to add a config option, which would either mean adding to AxiosRequestConfg or creating an interface for this project that extends AxiosRequestConfig and adds a mergeDefaultParameters option.
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
I would like parameters applied to all requests. When I setup my
HttpModule
I want to register with parametersI would like this parameters to be applied on every request. However, there are other parameters I need to apply specific to a request. For those requests I specify a new parameters object and the ones from the registration get overwritten.
To get around this I can do spread the default parameters, but that feels like the equivalent of just adding the parameters manually to every request.
Describe the solution you'd like
I would like HttpService to either merge the params object specified during module registration, or have some sort of config option to indicate that params need to be merged.
Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
Have the ability to have parameters in one place that will apply to all requests in a particular service. This makes it easy so that if a parameter needs to be added for all requests, it can be done in one place instead of updating each request in a service.
Turns this:
into:
The text was updated successfully, but these errors were encountered: