mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 08:12:25 +00:00
27 lines
484 B
Lua
27 lines
484 B
Lua
local reqAddr
|
|
local logReq = true
|
|
local payload
|
|
|
|
if not In.Params and In.Params.url or not In.Params.payload then
|
|
Out.Error = {
|
|
code = -32602,
|
|
message = "no url or payload provided"
|
|
}
|
|
return
|
|
end
|
|
|
|
reqAddr = In.Params.url
|
|
payload = In.Params.payload
|
|
|
|
local resp = Net.Http.Post(logReq, reqAddr, "application/json", payload)
|
|
if resp then
|
|
Out.Result.answer = {
|
|
status = resp.status,
|
|
body = resp.body
|
|
}
|
|
return
|
|
end
|
|
|
|
Out.Result.answer = {
|
|
status = resp.status
|
|
} |