Hello.
I understand what the HTTP Service does, but I have no idea how to use it. I checked the wiki, but it wasn't much help. Any tutorials, or links to tutorials would be appreciated.
Thanks,
Blue
Hello.
I understand what the HTTP Service does, but I have no idea how to use it. I checked the wiki, but it wasn't much help. Any tutorials, or links to tutorials would be appreciated.
Thanks,
Blue
Hi there, I am not an expert on this, but I can help a little:)
So if you wanna work with HttpService, you need to enable it in Game Settings. Just enable it and you should be good to go!
GetAsync
What GetAsync does is it gets the raw Http code of a website. To see the raw code, just go to a website like YouTube. Right click on an empty space and click Inspect then you will see the code, like this: http://prntscr.com/k46v7g. That is what GetAsync does.
PostAsync
Now PostAsync is really advanced and I don't really understand it, but it sends a HTTP POST request to the website. You need to learn web development to really understand this.
UrlEncode
UrlEncode encodes a string to be compatible for links. If you payed attention to website links, you'll know that it doesn't store it as a string. For example, the text "This is for testing" turn to %22This+is+for+testing%22
JSONEncode and JSONDecode
JSONEncode and JSONDecode are exact opposites. JSONEncode changes a table to a JSON string used on websites. JSONDecode changes a JSON string to a table.
GenerateGUID
GenerateGUID does what the name does. It generates a Globally Unique Identifier. I don't know how this can be useful but hey, it's there.
And that is every function and yield function that HttpService does. I hope this can help :)
I found this tutorial series helpful even though I will probably not ever use HTTP service especially because roblox already uses JSONencoding when sending DataStore stuff.
Thanks, I'll check that out.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Thanks