Replace NSHttpRequest with NSHttpGet

This commit is contained in:
okvdai
2023-06-02 12:58:35 +02:00
parent a5844b6be4
commit 2d2d456a85
+1 -4
View File
@@ -27,9 +27,6 @@ string function pulseFormatAsVersion(table Version) //Formats given version numb
bool function pulseIsUpToDate(string givenURL) //Compares version contained in our mod.json with a version.json contained on a remote GitHub repo (see VersionURL within mod.json).
{
bool result = false
HttpRequest versionreq
versionreq.method = HttpRequestMethod.GET
versionreq.url = givenURL
void functionref (HttpRequestResponse) onSuccess = void function(HttpRequestResponse response)
{
table DecodedJSON = DecodeJSON(response.body)
@@ -44,7 +41,7 @@ bool function pulseIsUpToDate(string givenURL) //Compares version contained in o
{
pulsePrintt("Something went wrong while getting latest version.")
}
NSHttpRequest(versionreq, onSuccess, onFailure)
NSHttpGet(givenURL, onSuccess, onFailure)
return result
}