Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace axios with fetch #139

Open
yathindrak opened this issue Sep 19, 2022 · 3 comments
Open

Replace axios with fetch #139

yathindrak opened this issue Sep 19, 2022 · 3 comments

Comments

@yathindrak
Copy link
Contributor

yathindrak commented Sep 19, 2022

Describe the improvement

Using fetch over axios will reduce the bundle size of the sdk. This would improve the cold starts in serverless environments as well.

Here, we may consider providing browser polyfills as well.

Additional context

Even though this issue is opened in the React SDK, the required changes need to be implemented in the SPA-SDK. We heavily rely on axios interceptors for SDK hooks[1], so it's necessary to explore whether an alternative approach using fetch can be implemented.

[1] https://github.com/asgardeo/asgardeo-auth-react-sdk/blob/main/API.md#on

@NipuniBhagya NipuniBhagya added Hacktoberfest good first issue Good for newcomers and removed good first issue Good for newcomers labels Oct 4, 2024
@Yash-sudo-web
Copy link

Hey @yathindrak @NipuniBhagya , i'd like to work on this issue, can i be assigned to it?

@pavinduLakshan
Copy link
Contributor

Hi @Yash-sudo-web , thanks for offering to help. Replacing axios with fetch will need a significant effort as some core SDK functionalities heavily rely on axios features. I have updated the issue description to include those information as well. Please let us know if you are still willing to take on the challenge.

@Yash-sudo-web
Copy link

@pavinduLakshan , i have also commented on Issus #251, can that be assigned to me first? i think that is less complex and would help out in understanding the codebase better

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

No branches or pull requests

4 participants