misery: use https

master
q3k 2022-07-05 19:25:44 +02:00
parent e90c7238b4
commit 87bc82590c
1 changed files with 4 additions and 4 deletions

View File

@ -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