return function (connection, req, args) local staConfig = {ssid="", pwd=""} connection:send("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nCache-Control: private, no-store\r\n\r\n") connection:send('Wifi Settings

Wifi settings

')

  connection:send("SSID: "..staConfig.ssid)
  connection:send("\nPassword: "..staConfig.pwd)
    
  connection:send('


') local form = [===[
SSID:

Password:

]===] if req.method == "GET" then connection:send(form) elseif req.method == "POST" then local rd = req.getRequestData() -- connection:send(cjson.encode(rd)) connection:send('

Received the following values:

') connection:send("\n") else connection:send("NOT IMPLEMENTED") end connection:send('') end