Skip to content

Instantly share code, notes, and snippets.

@jpatrickdill
Created June 27, 2019 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpatrickdill/8fe2a82c47c1bdf679eb1a1c5f07d7a0 to your computer and use it in GitHub Desktop.
Save jpatrickdill/8fe2a82c47c1bdf679eb1a1c5f07d7a0 to your computer and use it in GitHub Desktop.
Some HttpService code
local HttpService = game:GetService("HttpService")
local options = {
Url = "https://httpbin.org/post?arg=value",
Method = "POST",
Headers = {["Content-Type"] = "application/json"},
Body = HttpService:JSONEncode( {this="json"} )
}
local r = HttpService:RequestAsync(options)
print(r.Headers["content-type"],
HttpService:JSONDecode(r.Body).url)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment