minimalistic transformResponse for json response type#26
minimalistic transformResponse for json response type#26developit merged 3 commits intodevelopit:masterfrom
Conversation
|
About exposing |
|
What's the eta here? Would like to switch to redaxios for size, but I'd prefer not to have to go find every existing usage of axios and make them |
|
Looks good - I believe inlining the transformResponse function will help with file size here (this PR is up 27b, the size bot can't post on fork PRs). One thing I'm not quite sure of yet though, is whether it's actually necessary to use Line 186 in 28aa074 ... with something like: const withData = options.responseType === 'stream'
? Promise.resolve(res.body)
: res[options.responseType || 'json']().catch(() => res.text()); |
Hi,
#21 & maybe #13 could be solved with this PR. I tried to keep it minimal, even though it's not the most generic way to be done.
There should be a minor conflict with my previous PR, but I still preferred to push on separate branches.