Skip to content

Commit

Permalink
refactor: Address PR comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zurcusa committed Sep 19, 2024
1 parent 59ee88a commit 02ae840
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/com/limechain/teavm/HttpRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ private static void sendHttpRequest(String method, String url, String body, Asyn
});
}

/**
* Sends an HTTP request using the specified method and URL.
* The result or error is returned via the provided callback function.
*
* @param method - HTTP method
* @param url - The target URL for the request
* @param body - Optional request body (used for 'POST')
* @param callback - Function to handle the response or error
*/
@JSBody(params = {"method", "url", "body", "callback"}, script = "fetch(" +
"url, {" +
" method: method," +
Expand Down

0 comments on commit 02ae840

Please sign in to comment.