Loading/using LuaSocket

I’ve been trying to use LUA Socket, but I can’t seem to load the dll correctly.
Unfortunately, I don’t know much about loading external libraries in LUA, or compiling my own, for that matter.

If anyone could help me do this with some sample code, it would be greatly appreciated.

@kanersps your department right here!

Please take a look at server\resources[gamemodes][ocw]\ocw\server\dal_main.lua. It uses PerformHttpRequest to use chained HTTP services.

@0x420 Oh shit. Where does that function come from? I can’t find its definition anywhere.
Edit, nvm. I guess I found it, it’s internal to the server application: HttpScriptFunctions.cs

Edit 2:
Trying to dumb it down into a simple call, but the print inside with the response is not triggering. What am I doing wrong?

local url = "http://google.com/"
local method = "GET"

print("Doing it.")
PerformHttpRequest(url, function(code, result, headers)
    print("Response: " .. tostring(result))

    cb(0, nil)
end, method)

Not getting an error either.

@0x420 Slight bump? Idk if you saw my edits, if you did/didn’t get around to it, my apologies.

Please stand-by for his reply.

@Boss Already talked to him on Discord :wink: He’ll look into it, might be a problem with the PerformHttpRequest function.

@Eraknelo Good :smile: