axios-vcr icon indicating copy to clipboard operation
axios-vcr copied to clipboard

Axios 16 compat

Open myabc opened this issue 7 years ago • 4 comments

Some additions to @teppeis's PR #3 (mostly to address this comment: https://github.com/nettofarah/axios-vcr/pull/3#issuecomment-327885163)

  • support both older and newer versions of Axios.
  • set up testing against various versions of Axios.

myabc avatar Oct 15 '17 18:10 myabc

  1. Why do we need to support older axios?
  2. It's 0.17 already latest.

soswow avatar Nov 08 '17 10:11 soswow

Using this branch and axios 16 I have a problem. jsonPaths do not match between request and response During request:

{
   "url":"https://launchlibrary.net/1.2/launch",
   "method":"get",
   "headers":{
      "common":{
         "Accept":"application/json, text/plain, */*"
      },
      "delete":{
      },
      "get":{
      },
      "head":{
      },
      "post":{
         "Content-Type":"application/x-www-form-urlencoded"
      },
      "put":{
         "Content-Type":"application/x-www-form-urlencoded"
      },
      "patch":{
         "Content-Type":"application/x-www-form-urlencoded"
      }
   }
}

And during response

{
   "url":"https://launchlibrary.net/1.2/launch",
   "method":"get",
   "headers":{
      "Accept":"application/json, text/plain, */*"
   }
}

soswow avatar Nov 08 '17 10:11 soswow

also for some reason it doesn't take params parameter =\

soswow avatar Nov 08 '17 10:11 soswow

@soswow I would prefer that the library is backward compatible. But I'm ok with issuing a new major release to only support newer versions of axios

nettofarah avatar Nov 12 '17 09:11 nettofarah