Skip to content

Migrate away from Axios#438

Open
brionmario wants to merge 5 commits intoasgardeo:mainfrom
brionmario:refactor-thunder-flows
Open

Migrate away from Axios#438
brionmario wants to merge 5 commits intoasgardeo:mainfrom
brionmario:refactor-thunder-flows

Conversation

@brionmario
Copy link
Copy Markdown
Member

@brionmario brionmario commented Apr 4, 2026

Purpose

This pull request migrates the browser SDK's HTTP client implementation from Axios to a new native Fetch-based client. It removes all Axios dependencies and related legacy code, introduces a new FetchHttpClient class, and updates all usages and type references to use the new client. This modernizes the HTTP layer and reduces external dependencies.

The most important changes are:

HTTP Client Migration:

  • Introduced a new FetchHttpClient class in packages/browser/src/FetchHttpClient.ts, implementing the HTTP client using the native Fetch API and a singleton pattern for instance management.
  • Removed the legacy Axios-based client: deleted axios-http-client.ts and its exports, and removed all imports and references to HttpClientInstance and Axios types throughout the codebase. [1] [2] [3] [4] [5] [6]
  • Updated all usages of the HTTP client in legacy code to use FetchHttpClient or the new HttpClient interface from @asgardeo/javascript instead of the old Axios-based client. [1] [2] [3] [4] [5] [6] [7]

Dependency Cleanup:

  • Removed axios from packages/browser/package.json and removed the old brace-expansion package in favor of @isaacs/brace-expansion in the root package.json. [1] [2]

Type and Interface Updates:

  • Updated function signatures, type annotations, and callback interfaces to use the new client types, ensuring type safety and consistency with the new implementation. [1] [2] [3] [4] [5]

This change streamlines the SDK, reduces dependencies, and aligns the HTTP client implementation with modern browser APIs.

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the CONTRIBUTING guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
  • Unit tests provided. (Add links if there are any)

Security checks

@brionmario brionmario force-pushed the refactor-thunder-flows branch from 1077838 to 760f990 Compare April 4, 2026 19:56
@brionmario brionmario force-pushed the refactor-thunder-flows branch from 760f990 to 4b993d6 Compare April 5, 2026 03:57
@asgardeo-github-bot
Copy link
Copy Markdown

🦋 Changeset detected

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants