misery: use https
parent
e90c7238b4
commit
87bc82590c
|
@ -1,14 +1,14 @@
|
|||
local socket = require("socket")
|
||||
local http = require("socket.http")
|
||||
local https = require("https")
|
||||
local json = require("vendor.json")
|
||||
local lume = require("vendor.lume")
|
||||
|
||||
local miseryURL = 'http://oodviewer.q3k.me/randomterm.json/_,'
|
||||
local miseryURL = 'https://oodviewer.q3k.me/randomterm.json/_,'
|
||||
|
||||
local r, c, h = http.request(miseryURL)
|
||||
local c, r, h = https.request(miseryURL)
|
||||
if c == 200 then
|
||||
love.thread.getChannel('misery'):push(json.decode(r))
|
||||
print("Update finished")
|
||||
else
|
||||
print("Update failed")
|
||||
print("Update failed: " .. tostring(c) .. ": " .. tostring(r))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue