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
The method is always overwritten with the { method: 'get' }, so you are forced to pass the method in each request, like the following:
constmyAlwaysPostAPI=axios.create({baseURL: 'http://localhost'url : '/myResource',});myAlwaysPostAPI({method: 'post',//always forced to pass this in each API calldata : {key: 'value'}});
In ./lib/core/Axios.js
The method is always overwritten with the
{ method: 'get' }
, so you are forced to pass the method in each request, like the following:this also affects
Expected Behavier
I think the solution is to move the default method to defaults file, will follow this issue with a PR for that.
The text was updated successfully, but these errors were encountered: