Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //________________________________
- //
- // Made by feha, 20??
- //
- //________________________________
- // Note, this file is run in a shared environment.
- // Shared
- Print("Shared1")
- if Server then
- // Server
- Print("Server")
- local testdata = {
- first = "first",
- number = 42,
- bool = true,
- }
- Shared.SendHTTPRequest("www.google.com", "PUT", testdata,
- function(...)
- Print("PUT callback!")
- for k,v in pairs({...}) do
- Print(tostring(k) .. " ; type = " .. type(v))
- // Cant use Print, it errors for some reason, seems to have to do with string.format
- //Print("PUT: " .. tostring(k) .. " ; value = " .. tostring(v))
- Shared.Message("PUT: " .. tostring(k) .. " ; value = " .. tostring(v))
- end
- end
- )
- Shared.SendHTTPRequest("www.google.com", "POST", testdata,
- function(...)
- Print("POST callback!")
- for k,v in pairs({...}) do
- Print(tostring(k) .. " ; type = " .. type(v))
- // Cant use Print, it errors for some reason, seems to have to do with string.format
- //Print("POST: " .. tostring(k) .. " ; value = " .. tostring(v))
- Shared.Message("POST: " .. tostring(k) .. " ; value = " .. tostring(v))
- end
- end
- )
- Shared.SendHTTPRequest("www.google.com", "GET", testdata,
- function(...)
- Print("GET callback!")
- for k,v in pairs({...}) do
- Print(tostring(k) .. " ; type = " .. type(v))
- // Cant use Print, it errors for some reason, seems to have to do with string.format
- //Print("GET: " .. tostring(k) .. " ; value = " .. tostring(v))
- Shared.Message("GET: " .. tostring(k) .. " ; value = " .. tostring(v))
- end
- end
- )
- elseif Client then
- // Client
- Print("Client")
- elseif Predict then
- // Predict
- Print("Predict")
- end
- // Shared
- Print("Shared2")
Advertisement
Add Comment
Please, Sign In to add comment