[merge options] Inconsistent behavior between 0.18.1 and 0.19.0
See original GitHub issueDescribe the bug A clear and concise description of what the bug is. If your problem is not a bug, please file under Support or Usage Question
v0.19.0 changes the source code of merging default options and request options.
But the merging behavior wasn't kept same with v0.18.1.
For example, if default options is:
{
baseUrl: 'some_url',
params: {
foo: 'bar',
},
}
In v0.18.1, the merged options will contain `params`, but in v0.19.0, the merged options won't contain `params`.
To Reproduce Code snippet to reproduce, ideally that will work by pasting into something like https://npm.runkit.com/axios, a hosted solution, or a repository that illustrates the issue. If your problem is not reproducible, please file under Support or Usage Question
const instance = axios.create({
params: {
foo: 'bar',
},
});
instance({
url: 'some_url',
method: 'get',
});
// in v0.18.1
// GET some_url?foo=bar
// https://codesandbox.io/s/charming-wilson-9wkge
// in v0.19.0
// GET some_url
// https://codesandbox.io/s/nifty-fire-yhhth
Expected behavior A clear and concise description of what you expected to happen.
I think v0.19.0 shouldn't change the merging behavior.
Environment:
- Axios Version [0.19.0]
- OS: [OSX 10.14.6]
- Browser [Chrome]
- Browser Version [Version 76.0.3809.100 (Official Build) (64-bit)]
- Additional Library Versions [React 16.9]
Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:22
- Comments:5
Top Results From Across the Web
SciPy 1.6.0 Release Notes — SciPy v1.9.3 Manual
scipy.ndimage.zoom now has a grid_mode option that changes the coordinate of the center of the first pixel along an axis from 0 to...
Read more >What's new in 1.4.0 (January 22, 2022) - Pandas
These are bug fixes that might have notable behavior changes. Inconsistent date string parsing#. The dayfirst option of to_datetime() isn't strict ...
Read more >Release history — scikit-learn 0.19.2 documentation
This is documentation for an old release of Scikit-learn (version 0.19). ... and metrics.dcg_score which had been merged into version 0.19.0 by error....
Read more >Release Notes - Qiskit
Qiskit Metapackage Version qiskit‑terra qiskit‑aer qiskit‑ibmq‑provider Release Date
0.39.4 0.22.3 0.11.2 0.19.2 2022‑12‑08
0.39.3 0.22.3 0.11.1 0.19.2 2022‑11‑25
0.39.2 0.22.2 0.11.1 0.19.2 2022‑11‑03
Read more >HEPTAPOD_CHANGELOG.md · heptapod-0.30.0rc1 - GitLab
Heptapod 0.19.0 (2021-01-20). Summary of changes since Heptapod 0.18.1. More details are available in the sections below about the release candidates.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve just hit this, and found it very surprising. It goes against the use-case of
create
:While
params
is less likely to be used compared to sayauth
orheader
, at best it’s inconsistent - I’m now scared that any property I provide when callingcreate
will actually be used at all, and so have to spend time figuring out what’ll happen for every property.So let’s track in #2190. Hope someone can merge and release that soon.