Do thing
This commit is contained in:
parent
80475c62f2
commit
8fb06c39b1
2
README.md
Normal file
2
README.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Websocket Client for Roblox
|
||||
TODO: Detailed instructions on how to use this module will be added soon.
|
|
@ -1,6 +1,7 @@
|
|||
local Base64 = require(script.Base64)
|
||||
local JobId = game:GetService('HttpService'):GenerateGUID(false)
|
||||
local BaseUrl = "https://sock.kcadev.org/api/"
|
||||
print("jobid is " .. JobId)
|
||||
local BaseUrl = "https://sock.kcadev.org"
|
||||
local atob = Base64.atob
|
||||
local btoa = Base64.btoa
|
||||
local messages = {}
|
||||
|
@ -26,12 +27,14 @@ local ws = function (dict)
|
|||
["Url"] = BaseUrl .. "/connect/" .. JobId,
|
||||
["Method"] = "PUT",
|
||||
["Body"] = dict.url
|
||||
})
|
||||
}).Body
|
||||
print(id)
|
||||
print(typeof(id))
|
||||
local function sendMessage(msg)
|
||||
wait()
|
||||
server:PostAsync(BaseUrl .. "api/send/" .. JobId .."/"..id, msg)
|
||||
end
|
||||
|
||||
|
||||
local function close()
|
||||
server:RequestAsync({
|
||||
["Url"] = BaseUrl .. "api/close/" .. JobId .. "/" .. id,
|
||||
|
|
Loading…
Reference in a new issue