Skip to content

Remove dependency on axios #332

@pgfeller

Description

@pgfeller

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)

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions