Browse Source

Mobile http request stubs

Lubos Lenco 4 years ago
parent
commit
b910809605
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Sources/arm/sys/File.hx

+ 4 - 0
Sources/arm/sys/File.hx

@@ -93,6 +93,10 @@ class File {
 		}
 		#elseif krom_linux
 		Krom.sysCommand('wget -O "' + dstPath + '" ' + url);
+		#elseif (krom_android || krom_ios)
+		Krom.httpRequest(url, size, function(ab: js.lib.ArrayBuffer) {
+			if (ab != null) Krom.fileSaveBytes(dstPath, ab);
+		});
 		#else
 		Krom.sysCommand('curl -L ' + url + ' -o "' + dstPath + '"');
 		#end