Skip to content

Commit

Permalink
fix: status error with domain (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
dex-89 authored Jun 21, 2024
1 parent 386b230 commit ee401ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/corelib/http.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ function HTTP.onPost(operationId, url, err, data)
if not err and operation.json then
if data:len() == 0 then
data = "null"
else
data = string.sub(data,string.find(data,"{"),string.find(data,"}"))
end
local status, result = pcall(function() return json.decode(data) end)
if not status then
Expand Down

0 comments on commit ee401ae

Please sign in to comment.