This may be a bit of an advanced question, but I was wondering if there was a way to client-side connect a roblox game to a remote application for database logging,etc? I've performed some tests both from the application and in roblox but havn't come up with many promising results. If all else fails i'll have to perform some post requests to a remote database and pull from that database within the application, just wondering if there may have been an easier way?

some code i've come up with is this.

game.Players.PlayerAdded:Connect(function(player)
hs = game:GetService("HttpService")
contentTable = {
['username'] = player.Name
['id']  = player.userId
}
local contentTableJSON = JSONEncode(contentTable)
hs:PostAsync("http://localhost:8080", contentTableJSON)
end

If anyone has any ideas please let me know. I'd love to discuss this further and maybe figure out something that hasn't been done before.

Also, this is a bit off topic from the question, but how would one include headers in a post request?

2 comments

0

I already tried that.