The axios usage is minimal and straightforward—only a single GET request with JSON response handling. This is an ideal candidate for fetch API replacement because:
No advanced axios features used: The code doesn't use interceptors, request/response transformers, retry logic, or custom headers
Simple pattern: Just axios.get(url) → promise chain with .then(.catch())
Native fetch equivalent exists: Can be directly replaced with fetch(url).then(res => res.json()).catch(...)
⚠️ Breaking Changes Risk
One behavioral difference: fetch doesn't reject on HTTP error status codes (404, 500, etc.). Currently axios auto-rejects these. Mitigation is simple:
.then(res => {
if (!res.ok) throw new Error(`HTTP ${res.status}`)
return res.json()
})
#331 (comment)
The axios usage is minimal and straightforward—only a single GET request with JSON response handling. This is an ideal candidate for fetch API replacement because:
No advanced axios features used: The code doesn't use interceptors, request/response transformers, retry logic, or custom headers
Simple pattern: Just axios.get(url) → promise chain with .then(.catch())
Native fetch equivalent exists: Can be directly replaced with
fetch(url).then(res => res.json()).catch(...)One behavioral difference: fetch doesn't reject on HTTP error status codes (404, 500, etc.). Currently axios auto-rejects these. Mitigation is simple:
#331 (comment)