prevent decode from completely failing the rest

This commit is contained in:
dowoge 2023-03-02 18:16:33 -05:00
parent ec23690cc1
commit 94c1bc39e1

View File

@ -14,7 +14,7 @@ local STRAFES_NET_RATELIMIMT = {
local remaining_timeout = 0
local function request(method,url,headers,body,options)
local headers,body=http.request(method,url,headers,body,options)
local rbody=json.decode(body)
local rbody=json.decode(body) or body
local rheaders={}
for _,t in pairs(headers) do
if type(t)=='table' then