Advertisement
CAT_SUS

(syn and syn.request) or (http and http.request) or http_request or (fluxus and fluxus.request) or r

Jul 4th, 2023 (edited)
49,739
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local data = {}
  2.  
  3. local HtpsRequest = (syn and syn.request) or (http and http.request) or http_request or (fluxus and fluxus.request) or request;
  4.  
  5. function data:Request(UrlTarget,BodyData)
  6.     if typeof(BodyData) == "table" then
  7.         BodyData = game:GetService('HttpService'):JSONEncode(BodyData)
  8.     end
  9.     return HtpsRequest({
  10.         Url = UrlTarget,
  11.         Headers = {["Content-Type"] = "application/json"},
  12.         Method = "POST",
  13.         Body = BodyData,
  14.     })
  15. end
  16.  
  17. function data:GetRequest()
  18.     return HtpsRequest
  19. end
  20.  
  21. return data;
  22.  
Tags: Executor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement