Hi all,
I want to make a synchronous https get call that retrieves some json from a webserver. I want to decode the json object and return it. it should look something like this:
function getFromServer() local myJson = {} doNetworkCall() myJson = json.decode(networkCallResult) return myJson end
I tried it with network.request but this only works with callbacks? thus I cannot return the object. My network call also has to except headers.
I also tried using socket.http but didn’t understand how it worked.
Thanks in advance!
Rick Slot
----edit:
I forgot to mention that I also need to use HTTPS. I tried it with socket.http, but it doesnt work with https. I saw that I could use luasec, but it seems a bit devious to install all kind of things with ‘make’. I really need to focus on simplicity.