Part of the js-stellar-sdk modernization epic.
Goal
Remove axios (Node) and feaxios (browser) in favor of a single fetch-based HTTP client with behavior parity.
Scope
- Implement a
fetch-based client in src/http-client/ covering request/response interceptors, timeout, custom headers, and error shape compatibility with the existing axios-style surface used across src/horizon/, src/rpc/, src/stellartoml/, src/federation/, and src/friendbot/.
- Map non-2xx responses to the existing error shape (e.g.,
NetworkError, status code, response.data) so downstream catch blocks keep working.
- Preserve configurable global timeout and user-agent header behavior.
- Delete
src/horizon/horizon_axios_client.ts, src/http-client/axios-client.ts, src/rpc/axios.ts, and the src/no-axios/ scratch directory once migration lands.
Acceptance
Risks
fetch's streaming semantics differ from axios; the Horizon streaming code path needs careful validation against a live network.
Part of the js-stellar-sdk modernization epic.
Goal
Remove
axios(Node) andfeaxios(browser) in favor of a singlefetch-based HTTP client with behavior parity.Scope
fetch-based client insrc/http-client/covering request/response interceptors, timeout, custom headers, and error shape compatibility with the existingaxios-style surface used acrosssrc/horizon/,src/rpc/,src/stellartoml/,src/federation/, andsrc/friendbot/.NetworkError, status code,response.data) so downstreamcatchblocks keep working.src/horizon/horizon_axios_client.ts,src/http-client/axios-client.ts,src/rpc/axios.ts, and thesrc/no-axios/scratch directory once migration lands.Acceptance
axiosandfeaxiosremoved frompackage.jsonandyarn.lock.CallBuilderpagination, streaming (SSE), or error propagation.Risks
fetch's streaming semantics differ fromaxios; the Horizon streaming code path needs careful validation against a live network.