Skip to content

Consolidate the three HTTP layers (axios instance, apiClient wrapper, raw fetch) into one #1626

Closed

Description

@yusuftomilola

Problem

Requests go through lib/api.ts (axios with interceptors), lib/api/client.ts (a wrapper that re-serialises a fetch-style init by JSON.parse-ing the body only to hand it back to axios), and ad-hoc fetch('/api/...') calls in the search, scan and asset pages. The fetch calls skip auth and the base URL, and the wrapper hides axios features (abort signals, headers, params).

Proposed change

Export one typed axios instance and per-resource modules, delete apiClient.request, convert the remaining fetch calls, and document the convention in the README.

Acceptance criteria

  • No fetch('/api calls remain.
  • All query hooks use the single client; existing tests updated.

Activity

  1. oladev2026-tech commented on Oct 17, 2026

    @oladev2026-tech
    Contributor

    @oladev2026-tech has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi can i work on this?

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @oladev2026-tech to this issue.

  2. drips-wave commented on Oct 17, 2026

    @drips-wave

    Congratulations, @oladev2026-tech! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @oladev2026-tech: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  3. grantfox-oss commented on Oct 17, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @oladev2026-tech's PR #1693 was approved and merged by @yusuftomilola.

    🏆 @oladev2026-tech: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,729 total points). Track your full progress on GrantFox.

    👏 Great work, @oladev2026-tech! Keep contributing to DistinctCodes.

  4. drips-wave commented on Oct 17, 2026

    @drips-wave

    This issue has been completed by @oladev2026-tech as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @oladev2026-tech: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions