Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local inspect = require("inspect")
- -- NORMAL REQUEST
- --
- local internet = require("internet")
- local handle = internet.request("https://api.github.com/repos/JabJabJab/LanguagePackage")
- print(inspect(handle))
- local result = ""
- for chunk in handle do
- result = result..chunk
- end
- -- RETURN HTTP RESPONSE CODE, MESSAGE, AND HEADERS
- --
- local mt = getmetatable(handle)
- local code, message, headers = mt.__index.response()
- print("code="..tostring(code))
- print("message="..tostring(message))
- print("headers=")
- print(inspect(headers))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement