Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Enable the HTTP API
- os.loadAPI("http")
- -- Define the URL
- local url = "http://www.monas-cakes.co.uk"
- -- Make the HTTP GET request
- local response, status = http.get(url)
- -- Check for errors
- if not response then
- print("Error: " .. status)
- return
- end
- -- Print the response body
- print(response.readAll())
- -- Close the response
- response.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement