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

Fetch API #246

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Fetch API #246

wants to merge 4 commits into from

Conversation

Micrufun
Copy link
Contributor

Replace XMLHttpRequest with Fetch API. According to this:

The Fetch API ... will seem familiar to anyone who has used XMLHttpRequest, but the new API provides a more powerful and flexible feature set.

Why?

Fetch API might be helpful when implementing the audio streaming in the future. According to that:

By using the fetch() API, we can stream the data rather than waiting for the whole file to load.

@Micrufun
Copy link
Contributor Author

Test

Testing the code with npm run dev indicates that it works fine:

Screenshot_20230130_161833

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.

None yet

1 participant