Advertisement
Ov0sh

Test

Jan 23rd, 2022 (edited)
1,105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- https://github.com/kikito/inspect.lua/blob/master/inspect.lua
  2. local internet = require("internet")
  3.  
  4. local handle = internet.request("http://comp.naruto-calc.cf/test")
  5. local result = ""
  6. for chunk in handle do result = result..chunk end
  7. -- Print the body of the HTTP response
  8. -- print(result)
  9.  
  10. -- Grab the metatable for the handle. This contains the
  11. -- internal HTTPRequest object.
  12. local mt = getmetatable(handle)
  13.  
  14. -- The response method grabs the information for
  15. -- the HTTP response code, the response message, and the
  16. -- response headers.
  17. local code, message, headers = mt.__index.response()
  18. print("code = "..tostring(code))
  19. print("message = "..tostring(message))
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement