generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: ☞☞ HttpService Discussion ☜☜

Previous Thread :: Next Thread 
uyjulian is not online. 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 is not online. 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 is not online. uyjulian
Joined: 29 Nov 2012
Total Posts: 1214
16 Oct 2013 03:00 PM
Sorry, I meant Studio.
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
16 Oct 2013 03:03 PM
whats with the pointing fingers
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
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 is not online. 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 is not online. 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 is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
16 Oct 2013 04:01 PM
But what is its use?
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
16 Oct 2013 04:20 PM
how2use
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
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 is not online. 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 is not online. 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 is online. 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 is not online. 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
TheOneSwordfighter is not online. TheOneSwordfighter
Joined: 18 Feb 2013
Total Posts: 212
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 is not online. Sinfully
Joined: 31 Dec 2012
Total Posts: 992
17 Oct 2013 03:03 PM
Cross server communication?
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
17 Oct 2013 09:39 PM
^Yep.
Report Abuse
uyjulian is not online. uyjulian
Joined: 29 Nov 2012
Total Posts: 1214
17 Oct 2013 10:08 PM
Korrect :-)
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
18 Oct 2013 09:44 PM
@k9rosie: Where did you find that code?
Report Abuse
k9rosie is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image