plugin-axios
plugin-axios copied to clipboard
Merge configs
Currently object unpacking is being used to combine all of the configs. This does not allow setting axios settings higher up in the config stack that are objects. For example, if I want a global param for all requests I would expect to be able to go:
VuexORM.use(VuexORMAxios, {
params: {
key: "foo"
}
});
Currently any lower config specifying params will overwrite this. Something along the lines of lodash merge should be used. If I wanted to unset a setting higher up I can simply do something like:
Model.get('url', {
params: {
key: null
}
});
Thanks! Yea good idea. And thanks for the PR too! I'll check the PR.