Net fixes

This commit is contained in:
luboslenco
2025-09-13 14:33:36 +02:00
parent c2f63843ca
commit 64386aa36c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ void iron_https_request(const char *url_base, const char *url_path, const char *
jbyte *elements = (*env)->GetByteArrayElements(env, bytes_array, NULL);
if (elements != NULL) {
callback((char *)elements, callbackdata);
(*env)->ReleaseByteArrayElements(env, bytes_array, elements, JNI_ABORT);
// (*env)->ReleaseByteArrayElements(env, bytes_array, elements, JNI_ABORT);
}
(*vm)->DetachCurrentThread(vm);
@@ -13,7 +13,7 @@ class AndroidHttpRequest {
public static byte[] androidHttpRequest(String url_base, String url_path) throws Exception {
try {
// https://developer.android.com/reference/java/net/HttpURLConnection.html
URL url = new URL(url_base + "/" + url_path);
URL url = new URL("https://" + url_base + "/" + url_path);
HttpURLConnection urlConnection = (HttpURLConnection)url.openConnection();
InputStream in = new BufferedInputStream(urlConnection.getInputStream());