hi anyone, i’m trying to send a post request via lua, I thought I could use os.execute, but it doesn’t work - anyone know how I can send a simple https post request via lua?
os.execute(‘curl -X POST
-H “X-Parse-Application-Id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
-H “X-Parse-REST-API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
-H “Content-Type: application/json”
-d ‘{“score”:1337,“playerName”:“Sean Plott”,“cheatMode”:false}’
https://api.parse.com/1/classes/GameScore’)
also tried this, shows success in vera ui (test lua page) works but doesn’t actually do anything.
local myjson=‘{“score”:1337,“playerName”:“Sean Plott”,“cheatMode”:false}’
os.execute(‘curl -X POST
-H “X-Parse-Application-Id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
-H “X-Parse-REST-API-Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
-H “Content-Type: application/json”
-d ‘… myjson …’
https://api.parse.com/1/classes/GameScore’)