In my opinion, switching to Axios is still worth it.
Testing
The only things I use this package for are creating redirects and creating tokens, so those are the only things I've tested. Other users should test out the rest of the package before this PR is merged.
Thanks for raising this PR for migrating to Axios from Popsicle. Few comments,
I tested the sample client with your branch code and it seems to be working fine. However, as it introduces some breaking changes, the overall impact needs to be assessed and tested.
Fixes: #143
Axios is not a drop-in replacement for Popsicle. Here are a few of the API differences:
data
instead ofbody
.Axios.get()
will override the themethod
option.transport
option.res.data
.JSON.stringify()
because ofres.request
.Breaking Change
Given the
transport
issue, this PR does introduce a breaking change. Users that receive a PDF will have to change their code from this:To this:
In my opinion, switching to Axios is still worth it.
Testing
The only things I use this package for are creating redirects and creating tokens, so those are the only things I've tested. Other users should test out the rest of the package before this PR is merged.