Page 1 of 1
Send an http request with the possibility to evaluate the answer
Posted: Fri Mar 08, 2019 9:13 pm
by Gille
hi nerds
How can I send http requests with Livecode and evaluate the response from the web server?
I use the community version ...
many Greetings
Gille
Re: Send an http request with the possibility to evaluate the answer
Posted: Fri Mar 08, 2019 9:45 pm
by dunbarx
Hi,
Not sure what you are asking, but right now go to the dictionary, and look for "URL". Now filter out everything but commands. Do any of those, especially "Launch URL or "revGoURL", help?
Also check out the "related" items in the entry.
And maybe you might like the "get URL" variant of the "get" command.
Craig Newman
Re: Send an http request with the possibility to evaluate the answer
Posted: Sat Mar 09, 2019 4:08 pm
by Gille
hello Craig,
Thanks for your quick reply.
Please look here:
https://www.auerswald.de/de/service/125 ... pi-de.html
I would like to send http-Request with the app and evaluate the answer.
many Greetings
Gille
Re: Send an http request with the possibility to evaluate the answer
Posted: Sat Mar 09, 2019 4:19 pm
by mrcoollion
Re: Send an http request with the possibility to evaluate the answer
Posted: Sat Mar 09, 2019 4:21 pm
by Klaus
Hi gille,
what Craig said about -> get url"xyz"
To use the first example from the API:
Code: Select all
...
put url("https://192.168.0.240/app_about") into tServerAntwort
## Check for errors here, I'll leave that to you :-)
## The server returns a JSON array, and LC can convert this to a LC array:
put JSONtoArray(tServerAntwort) into tLCArray
## Now you can parse that array LCArray...
...
Best
Klaus
Re: Send an http request with the possibility to evaluate the answer
Posted: Sat Mar 09, 2019 8:43 pm
by Gille
cool!
And thank you !!!
I'll try it right away!
Re: Send an http request with the possibility to evaluate the answer
Posted: Sun Mar 10, 2019 10:04 pm
by Gille
Hello Klaus,
can we meet in the German-speaking forum?
I do not really get along.
Can you trace the query?
Re: Send an http request with the possibility to evaluate the answer
Posted: Sun Mar 10, 2019 11:15 pm
by Klaus
Gille wrote: ↑Sun Mar 10, 2019 10:04 pm
Hello Klaus,
can we meet in the German-speaking forum?
Klaro, bis denne...
Re: Send an http request with the possibility to evaluate the answer
Posted: Mon Mar 11, 2019 4:09 pm
by Klaus
I'm waiting!
