Implement support for more arbitrary HTTP methods. Allows GET PUT and POST. With minor changes needed to support others

This commit is contained in:
Ryan Voots
2015-08-31 18:01:06 -07:00
parent af57939e0d
commit ef340bc82a
12 changed files with 128 additions and 37 deletions

View File

@@ -21,7 +21,7 @@ local function pushTheButton(connection, pin)
end
return function (connection, args)
return function (connection, req, args)
print('Garage door button was pressed!', args.door)
if args.door == "1" then pushTheButton(connection, 1) -- GPIO1
elseif args.door == "2" then pushTheButton(connection, 2) -- GPIO2