mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 20:12:25 +00:00
update Net.Http.Get example
This commit is contained in:
@@ -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
|
if resp then
|
||||||
Out.Result.answer = {
|
Out.Result.answer = {
|
||||||
status = resp.status,
|
status = resp.status,
|
||||||
|
|||||||
Reference in New Issue
Block a user