Rachio API / cURL

What would be the proper LUA code to use to interface with the Rachio public API?

Here’s an example using cURL:

curl -X GET -H “Content-Type: application/json” -H “Authorization: Bearer 8e600a4c-0027-4a9a-9bda-ab8d5c90350d” https://api.rach.io/1/public/device/2a5e7d3c-c140-4e2e-91a1-a212a518adc5/current_schedule

I believe I need to use os.execute?

Give this a quick read, I’d opt out of using os.execute when you can simply use http.request (pure Lua).
[url=http://w3.impa.br/~diego/software/luasocket/http.html]http://w3.impa.br/~diego/software/luasocket/http.html[/url]

[quote=“jlutsky, post:1, topic:193061”]What would be the proper LUA code to use to interface with the Rachio public API?

Here’s an example using cURL:

curl -X GET -H “Content-Type: application/json” -H “Authorization: Bearer 8e600a4c-0027-4a9a-9bda-ab8d5c90350d” https://api.rach.io/1/public/device/2a5e7d3c-c140-4e2e-91a1-a212a518adc5/current_schedule

I believe I need to use os.execute?[/quote]