Net fixes
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user