I′m completely lost on why this is happening, on previous versions everything worked well and on ios i don′t have any problems, but on android the below crashes:(i′m using the https module
https.request({
url: "https://my_link",
method: "POST",
body:{ "grupo": gotData.tappedItem.grupo },
allowLargeResponse:true,
headers:{
"Cache-Control": "no-cache",
"Content-Type":"application/json"
}
}).then((response) => {
And this also crashes:
https.request({
url: "https://my_link?grupo="+gotData.tappedItem.grupo,
method: "GET",
allowLargeResponse:true,
headers:{
"Cache-Control": "no-cache",
"Content-Type":"application/json"
}
}).then((response) => {
Is it the code? am i typing anything wrong?. I already tried deleting the platforms and delete from the device, and i have download the certificate to app/assets folder but it just doesn′t work and this is the error:
System.err: An uncaught Exception occurred on "main" thread.
System.err: Calling js method onResponse failed
System.err: Error: android.os.NetworkOnMainThreadException
System.err:
System.err: StackTrace:
System.err: onResponse(file: node_modules/nativescript-https/https.android.js:492:0)
My tns info:
? Getting NativeScript components versions information...
? Component nativescript has 7.1.2 version and is up to date.
? Component @nativescript/core has 7.1.4 version and is up to date.
? Component @nativescript/ios has 7.1.1 version and is up to date.
? Component @nativescript/android has 7.0.1 version and is up to date.
question from:
https://stackoverflow.com/questions/65884325/nativescript-https-request-not-working-on-android-platform-v7-0-1 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…