Closed dries007 closed 4 years ago
Hey,
this looks fine to me. Thanks for the PR! I'll merge it this weekend.
I am currently in the middle of creating tests and integrating your changes. Unfortunately, I'm not done with that yet. I hope to have it ready by the end of the week. Sorry for the delay!
@christianmalek That's unfortunate, but thanks for the quick response & keeping me up to date anyway :)
@dries007 I've changed my mind. Your PR is up. It's in version 2.13.0. You're credited here: https://github.com/christianmalek/vuex-rest-api/blob/v2/CHANGELOG.md
The HTTP standard allows for payloads in non POST/PUT/PATH requests, and so does Axios. Axios does require it to be passed via the config instead of as the second parameter, see axios/axios#897 and the relevant docs. To make things simpler I put everything into a config object and pass that to the request call instead of using the method aliases.
This was written in the GitHub editor, and it's my frist time writing typescript, so please advise if I'm doing something wrong.
This change will allow me to fully use this library. For now I have hack around this with some ugly direct state manipulation.