From 148ca535384f83c7541b09d52c94785c02170fd2 Mon Sep 17 00:00:00 2001 From: Alexey Date: Thu, 31 Jul 2025 20:46:02 +0300 Subject: [PATCH] update Net.Http.Get example --- com/Net/GetExpl.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/com/Net/GetExpl.lua b/com/Net/GetExpl.lua index 65b5219..e201b3b 100644 --- a/com/Net/GetExpl.lua +++ b/com/Net/GetExpl.lua @@ -1,4 +1,16 @@ -local resp = Net.Http.Get(true, "https://google.com") +local reqAddr + +if In.Params and In.Params.url then + reqAddr = In.Params.url +else + Out.Error = { + code = -32602, + message = "no url provided" + } + return +end + +local resp = Net.Http.Get(true, reqAddr) if resp then Out.Result.answer = { status = resp.status,