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

I don't get HTTPService at all. Any help?

Asked by
commag 228 Moderation Voter
7 years ago

I understand that people don't like making scripts for others, so instead I'm asking for an understanding of the subject. I don't understand HTTPService even after reading the wiki page. I feel I could really do more with my scripting if only someone would help me grasp the concept. Thanks in advance.

--Commag

1 answer

Log in to vote
0
Answered by 7 years ago

HTTPService has two main functions - GetAsync and PostAsync

GetAsync retrieves the HTML from the url provided:

print(game:GetService('HttpService'):GetAsync('http://example.org'))

In the output you should see lots of text. This can be used for a lot of things.

PostAsync posts to the url provided with a value and some other optional parameters.

There are different APIs for different websites that do specific things, such as the Discord, Trello or Pastebin web APIs.

Ad

Answer this question