This commit is contained in:
MihailRis 2026-09-10 20:38:50 +03:00
parent 9226f362a7
commit 946728e54e
3 changed files with 28 additions and 2 deletions

View file

@ -125,17 +125,21 @@ network.request = request
network.get = function(url, callback, errorCallback, headers)
return request(url, {
method = "GET",
headers = headers,
on_response = callback,
on_error = errorCallback,
follow_location = true,
})
end
network.get_binary = function(url, callback, errorCallback, headers)
return request(url, {
method = "GET",
headers = headers,
on_response = callback and (function (response) return callback(Bytearray(response)) end),
on_error = errorCallback
on_error = errorCallback,
follow_location = true,
})
end