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

added async http request and removed old sync impl #6

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

Grigorov-Georgi
Copy link
Collaborator

Description

In order to make http requests non-blocking the previous synchronous calls are replaced with asynchronous ones. Additionally, the new implementation in the http.js script utilizes async-await syntax, which is easier to understand than the old XMLHttpRequest approach.

What does this PR do?
Fixes LimeChain#506

How were these changes implemented and what do they affect?
Changes have been made to the HttpRequest class and http.js script, which are called by the JsonUtil class. These modifications will not be visible to all users of the JsonUtil class.

@Grigorov-Georgi Grigorov-Georgi self-assigned this Aug 14, 2024
src/main/java/com/limechain/teavm/HttpRequest.java Outdated Show resolved Hide resolved
src/main/java/com/limechain/teavm/HttpRequest.java Outdated Show resolved Hide resolved
src/main/java/com/limechain/teavm/HttpRequest.java Outdated Show resolved Hide resolved
src/main/java/com/limechain/teavm/HttpRequest.java Outdated Show resolved Hide resolved
src/main/webapp/js/http.js Outdated Show resolved Hide resolved
@Grigorov-Georgi Grigorov-Georgi merged commit 8663462 into dev Aug 15, 2024
1 check passed
@Grigorov-Georgi Grigorov-Georgi deleted the 506-impl-async-http-request branch September 10, 2024 11:33
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.

Implement async fetch functionality in the TeaVm Fruzhin project.
4 participants