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
I'm trying to convert some axios requests to redaxios and I'm noticing a discrepancy in the responses. The data object coming back from redaxios is stringified, whereas the data object I currently receive with axios is valid JSON. I am wondering if it would make sense to do this conversion in redaxios so that it is truly a drop-in replacement of axios?
Looking forward to hearing your thoughts, thanks!
The text was updated successfully, but these errors were encountered:
Ah - I'm guessing Axios inspects the response headers and determines when JSON should be used rather than text. I think we can add that here. Good catch!
Thanks for the tip @hasan-wajahat - I actually had read that wrong in the docs (I've never used Axios!). I amended the solution from #26 based on your comment.
Hey there,
I'm trying to convert some axios requests to
redaxios
and I'm noticing a discrepancy in the responses. The data object coming back fromredaxios
is stringified, whereas the data object I currently receive withaxios
is valid JSON. I am wondering if it would make sense to do this conversion inredaxios
so that it is truly a drop-in replacement of axios?Looking forward to hearing your thoughts, thanks!
The text was updated successfully, but these errors were encountered: