We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c67ed16 commit 6158d4bCopy full SHA for 6158d4b
httpserver-request.lua
@@ -46,6 +46,10 @@ local function getRequestData(payload)
46
local requestData
47
return function ()
48
--print("Getting Request Data")
49
+ -- for backward compatibility before v2.1
50
+ if (sjson == nil) then
51
+ sjson = cjson
52
+ end
53
if requestData then
54
return requestData
55
else
@@ -60,7 +64,7 @@ local function getRequestData(payload)
60
64
--print("body = [" .. body .. "]")
61
65
if mimeType == "application/json" then
62
66
--print("JSON: " .. body)
63
- requestData = cjson.decode(body)
67
+ requestData = sjson.decode(body)
68
elseif mimeType == "application/x-www-form-urlencoded" then
69
requestData = parseFormData(body)
70
0 commit comments