Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local api = {}
- local https = game:GetService("HttpService")
- local base = "https://commandapi.glitch.me/"
- local get = "getCommands"
- local post = "postCommand/"
- function api.GET()
- local s, e = pcall(function()
- local request = https:RequestAsync({
- Url = base..get,
- Method = "GET"
- })
- end)
- if s then
- return e
- else
- return warn(e)
- end
- end
- function api.POST(cmd)
- local s, e = pcall(function()
- local request = https:RequestAsync({
- Url = base..post..cmd,
- Method = "POST"
- })
- end)
- if s then
- return e
- else
- return warn(e)
- end
- end
- return api
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement