Update applications/randomuser/randomuser_httplib.ring
@@ -11,12 +11,6 @@ load "httplib.ring"
import System.Web
-cFirstName = ""
-cLastName = ""
-cEmail = ""
-cGender = ""
-cImageFile = ""
-
? "Start the server..."
oServer = new Server
@@ -26,7 +20,7 @@ oServer.route(:Get,"/randomuser",:randomuser)
? "Listen to port 5000"
oServer.listen("0.0.0.0", 5000)
-func GetUserData
+func randomuser
cData= download("https://randomuser.me/api")
@@ -37,10 +31,6 @@ func GetUserData
cEmail = aList[:Results][1][:email]
cImageFile = aList[:Results][1][:picture][:large]
-func randomuser
-
- GetUserData()
-
oPage = New HTMLPageFunctions
{
title = "Random User"
