updated docs

This commit is contained in:
Evil Factory
2021-09-23 16:14:39 -03:00
parent 1f04fea3cc
commit 8d52f2d664
2 changed files with 5 additions and 7 deletions

View File

@@ -8,15 +8,13 @@ Class providing networking related tasks.
local Networking = {}
--- Send a post HTTP Request.
-- treturn string result.
--- Send a post HTTP Request, callback is called with an argument result string.
-- @realm server
function Networking.RequestPostHTTP(url, textData, contentType) end
function Networking.RequestPostHTTP(url, callback, textData, contentType) end
--- Send a get HTTP Request.
-- treturn string result.
--- Send a get HTTP Request, callback is called with an argument result string.
-- @realm server
function Networking.RequestGetHTTP(url) end
function Networking.RequestGetHTTP(url, callback) end
--- Creates a new net message, returns an IWriteMessage
-- treturn IWriteMessage netMessage

View File

@@ -57,7 +57,7 @@ Hook.Add("chatMessage", "discordIntegration", function (msg, client)
local escapedName = escapeQuotes(client.name)
local escapedMessage = escapeQuotes(msg)
Networking.RequestPostHTTP(discordWebHook, '{\"content\": \"'..escapedMessage..'\", \"username\": \"'..escapedName..'\"}')
Networking.RequestPostHTTP(discordWebHook, function(result) end, '{\"content\": \"'..escapedMessage..'\", \"username\": \"'..escapedName..'\"}')
end)
```