mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
fix
This commit is contained in:
parent
9226f362a7
commit
946728e54e
3 changed files with 28 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue