prevent decode from completely failing the rest
This commit is contained in:
parent
ec23690cc1
commit
94c1bc39e1
@ -14,7 +14,7 @@ local STRAFES_NET_RATELIMIMT = {
|
|||||||
local remaining_timeout = 0
|
local remaining_timeout = 0
|
||||||
local function request(method,url,headers,body,options)
|
local function request(method,url,headers,body,options)
|
||||||
local headers,body=http.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={}
|
local rheaders={}
|
||||||
for _,t in pairs(headers) do
|
for _,t in pairs(headers) do
|
||||||
if type(t)=='table' then
|
if type(t)=='table' then
|
||||||
|
Loading…
Reference in New Issue
Block a user