-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #197 from Tom3s/load-placement-in-medal-menu
[#196] Show Placement after completing runs
- Loading branch information
Showing
8 changed files
with
81 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
extends Node | ||
|
||
func sendRequest( | ||
requesterNodeName: String, | ||
requestUrl: String, | ||
headers: Array, | ||
method: int, | ||
payload: String, | ||
timeout: float, | ||
onRequestSuccess: Callable, | ||
) -> void: | ||
var request = HTTPRequest.new() | ||
add_child(request) | ||
request.timeout = timeout | ||
|
||
request.request_completed.connect(func(_result, response_code, _headers, _body): | ||
if response_code != 200: | ||
print("[" + requesterNodeName + "'s request] Error with response: " + _body.get_string_from_utf8()) | ||
return | ||
onRequestSuccess.call(_body) | ||
) | ||
|
||
headers.append("Content-Type: application/json") | ||
|
||
var httpError = request.request( | ||
requestUrl, | ||
headers, | ||
method, | ||
payload | ||
) | ||
|
||
if httpError != OK: | ||
print("[" + requesterNodeName + "'s request] Error while sending request: " + error_string(httpError)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters