Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Can somebody explain the uses with Http Service?

Asked by 10 years ago

I've looked at the wiki, but I need further explanation on some of the uses http services can do. Any help please? Thank you!

1 answer

Log in to vote
2
Answered by
Lacryma 548 Moderation Voter
10 years ago

HttpService is primarily used to interact with a web server/website.

HttpService allows you to GET and POST data.

GET consists of geting data.

POST consists of posting data.

You have most likely heard of an web api.

Some allow you to get the userId of a player with the only information you have is his name and vice versa. Others enable you to get certain stats such as the forum posts of the player.

Unless you are planning to gather data from the game to save onto your own database, you will most likely use GET.

Some user created web apis can be found here!

Information on sending http requests can be found here.

0
This sounds like the most obvious explanation, but it is actually wrong. Both get and post can be used to send data along with the request. To send data along with a get request you would have to concatenate it to the string. Often the post method is preferred because of cleaner URLs and the user doesn't see the data being posted, in Roblox's case this does not matter. The post method however sen juzzbyXfalcon 155 — 10y
0
[CONT]however sends the data in the header of the request. The actual processing of data is always done on the server where the data is handled and saved when necessary. juzzbyXfalcon 155 — 10y
0
Although both can be used, POST is preferred and is created to be utilized in that way. Lacryma 548 — 10y
0
Correct. I also doubt that use :PostAsync() will even return anything, so it may not be able to be used for retrieving data on Roblox. I tought it should be noted that normally when sending http requests get and post can both submit and request data. juzzbyXfalcon 155 — 10y
Ad

Answer this question