uyjulian
|
  |
| Joined: 29 Nov 2012 |
| Total Posts: 1214 |
|
|
| 16 Oct 2013 02:57 PM |
HttpService:
> Requires HttpService.HttpEnabled to be true > HttpEnabled stays persistent. > HttpService supports HTTPS > HttpService only works server side |
|
|
| Report Abuse |
|
|
uyjulian
|
  |
| Joined: 29 Nov 2012 |
| Total Posts: 1214 |
|
|
| 16 Oct 2013 02:59 PM |
Oh, HttpService is not enabled on ROBLOX yet. To enabled in server you need to do this also:
> Game:SetPlaceId(Game.PlaceId, true) |
|
|
| Report Abuse |
|
|
uyjulian
|
  |
| Joined: 29 Nov 2012 |
| Total Posts: 1214 |
|
| |
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 16 Oct 2013 03:03 PM |
| whats with the pointing fingers |
|
|
| Report Abuse |
|
|
|
| 16 Oct 2013 03:55 PM |
'To enabled in server you need to do this also:
> Game:SetPlaceId(Game.PlaceId, true)'
No... you don't. I didn't do this, and it worked. |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 16 Oct 2013 03:57 PM |
what is httpservice? I don't see it in the wiki |
|
|
| Report Abuse |
|
|
uyjulian
|
  |
| Joined: 29 Nov 2012 |
| Total Posts: 1214 |
|
|
| 16 Oct 2013 04:00 PM |
@PreHisTorIcMan yeah that is correct @janthran it's a new service, it doesn't appear on the wiki magically |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
| |
|
| |
|
|
| 16 Oct 2013 04:23 PM |
| If you don't see what use it is... I don't even know what to say about that. |
|
|
| Report Abuse |
|
|
uyjulian
|
  |
| Joined: 29 Nov 2012 |
| Total Posts: 1214 |
|
|
| 17 Oct 2013 10:08 AM |
HttpService:GetAsync("url here") HttpService:PostAsync("url here", "ctnt") |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 17 Oct 2013 11:45 AM |
| Well since nobody's explained what it actually is I don't see how I'm expected to know what the usage of it is. |
|
|
| Report Abuse |
|
|
As8D
|
  |
| Joined: 24 Dec 2009 |
| Total Posts: 2907 |
|
|
| 17 Oct 2013 11:47 AM |
[Http]Service.
Ohwell, I've heard rumors about it before...
Also, is it a shame you can't change HttpService.HttpEnabled using a Script? Do you see this as a good thing? Why? Why not? And other questions that can be used to make a discussion.
- Evil As, dem datachairs!!! IT DEM DATACHAIRS! |
|
|
| Report Abuse |
|
|
yoyoman2
|
  |
| Joined: 07 Mar 2009 |
| Total Posts: 2170 |
|
|
| 17 Oct 2013 11:52 AM |
If you open it up to the general public.
people might get info from no-no sites.
so, even though I would love to muck around with servers and all kinds of cool stuff, I cant blame roblox for not releasing it, since It is a little dangerous to thier public figure.
Also, someone will probably find some haxy way to run a program through it or something. |
|
|
| Report Abuse |
|
|
|
| 17 Oct 2013 02:23 PM |
Hey guys, let's write something that runs a GET request on an image, takes that data, and reconstructs it into frames so we can use remote images! :D
while obamacare() do benefitMiddleClass() end --LuaWeaver |
|
|
| Report Abuse |
|
|
Sinfully
|
  |
| Joined: 31 Dec 2012 |
| Total Posts: 992 |
|
|
| 17 Oct 2013 03:03 PM |
| Cross server communication? |
|
|
| Report Abuse |
|
|
| |
|
uyjulian
|
  |
| Joined: 29 Nov 2012 |
| Total Posts: 1214 |
|
| |
|
|
| 17 Oct 2013 10:10 PM |
HOLY COW! INTERGAME DATA PERSISTENCE TOOOOOOOO!
ASIDE FROM THAT, PSEUDO PERSONAL SERVER, TRELELELEL ROBLOX LOSES DIS MATCH. |
|
|
| Report Abuse |
|
|
Sinfully
|
  |
| Joined: 31 Dec 2012 |
| Total Posts: 992 |
|
|
| 17 Oct 2013 10:42 PM |
| Anyone think it'd be possible for this to work with Dropbox? |
|
|
| Report Abuse |
|
|
uyjulian
|
  |
| Joined: 29 Nov 2012 |
| Total Posts: 1214 |
|
|
| 18 Oct 2013 09:37 AM |
| Sin IDK if there's a black list. |
|
|
| Report Abuse |
|
|
k9rosie
|
  |
| Joined: 05 Jul 2008 |
| Total Posts: 14339 |
|
|
| 18 Oct 2013 09:31 PM |
You can also use it to GET/POST JSON from a remote location.
|
|
|
| Report Abuse |
|
|
k9rosie
|
  |
| Joined: 05 Jul 2008 |
| Total Posts: 14339 |
|
|
| 18 Oct 2013 09:43 PM |
More info: It's basically the XHR equivalent for RBX.Lua. Looks like you can only send post and get requests for now (which is pretty much all you'll ever need) between servers. It won't work with Dropbox, you need a server that can handle http requests.
Here's some example code I found, it looks like it was written for a Halloween event or something:
Game.Players.PlayerAdded:connect(function() Player:WaitForDataReady() _G[player.Name .. "SESSION"] = {} if Player:LoadNumber('SESSION_COUNT') then _G[player.Name .. "SESSION"][SESSION_COUNT] = Player:LoadNumber('SESSION_COUNT') else _G[player.Name .. "SESSION"][SESSION_COUNT] = 1 end local httpService = Game:GetService('HttpService') local data = { UserId = player.userId, User = Player.Name, StartTime = tick(), EndTime = nil } local body = httpService:JSONEncode(data) httpService:PostAsync('http://www.canavus.com/roblox/halloween.php', body, Enum.HttpContentType.ApplicationJson) end)
Game.Players.PlayerRemoving:connect(function(player) player:SaveNumber('SESSION_COUNT', _G[player..Name .. "SESSION"][SESSION_COUNT]) local httpService = Game:GetService('HttpService') local data = { UserId = player.userId, User = Player.Name, StartTime = nil, EndTime = tick() } local body = httpService:JSONEncode(data) httpService:PostAsync('http://www.canavus.com/roblox/halloween.php', body, Enum.HttpContentType.ApplicationJson) end) |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 18 Oct 2013 09:44 PM |
| @k9rosie: Where did you find that code? |
|
|
| Report Abuse |
|
|
k9rosie
|
  |
| Joined: 05 Jul 2008 |
| Total Posts: 14339 |
|
|
| 18 Oct 2013 09:46 PM |
| I literally googled "HttpService roblox" and found like 3 pastebins of code. Probably put up by ROBLOX coders sharing code with each other. |
|
|
| Report Abuse |
|
|