Hi,
I’m trying to connect to a local webserver to test a webAPI.
I can connect to the API using browser receiving JSON results
This is the complete URL: http://127.0.0.1:8080/SQL_Server_API/SELECT?QUERY=SELECT%20*%20FROM%20TF_UTENTI
AND this is the returned JSON string
{“error”:{“status”:false,“code”:0,“source”:""},“result”:[[“69”,“Name”,“password”,“login_name”,“Y”,“10”]]}
If I try to connect to this URL with thunkable in LIVE TEST I can get nothing from the url and I can’t figure out why.
What’s wrong with my code?
You need to display status and error in a label to see the problem.
If status is any number other than 200 then there is a problem and error might give you a description of the problem.
[UPDATE]
I assume you are running it from the computer so you will not be able to run it from your mobile and most of the API servers fail to respond from the Web Live Test. Make sure your local webserver does work from the Web Live Test.
I’ve Already done but no response, error or status at all.
The problem is only in Web Live Test from PC.
If i download the apk, and run it from mobile, all work good.
But this behavior prevents me from debugging the app.
Even the live app test from mobile is impossible 'cause I need to be connected via wifi to my LAN(without internet), but thunkable need to be connected via internet.
Make sure your local webserver does work from the Web Live Test
It doesn’t seems so. Are there any settings i can modify to make it works?
UPDATES:
Only sometimes , after a long time, I receive an error. It seems that Web live test make a request via https even if I use an http url
The focus is that this should be an internal application. It should not admit access from internet but only from the lan.
But as I understand, Live test functionality use web to access resouces and so it’s blocked.
I really don’t know if it’s possible to move my API to the cloud, 'cause I developed it with LabVIEW
It’s a long time since I did any work in LabVIEW but I think this should be possible with the latest software?
Yeah, that’s a pretty legitimate security concern. I think the solution will involve opening ports while you are testing (higher security risk) and then closing them again when you have installed the app, since the installed version is working for you, right?
(And this is the main requirement? i.e. once the app is able to connect rather then once Thunkable Live is able to connect)
Can you say a little more about what you’re trying to do? When you say “connect phones via local wifi” … for what purpose? How does this have to do with APIs? If it doesn’t, please create a new topic and explain in more detail.