From 8c46301da70740ee40f707e88dd170243c6dd46a Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 24 Feb 2025 13:23:19 -0600 Subject: error handling and parse_url on srequest --- tests/https.lua | 5 +++++ tests/wss.lua | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 tests/https.lua (limited to 'tests') diff --git a/tests/https.lua b/tests/https.lua new file mode 100644 index 0000000..83c5904 --- /dev/null +++ b/tests/https.lua @@ -0,0 +1,5 @@ +llby = require"lullaby" + +val, ext = llby.net.srequest("https://amyy.cc/") +llby.io.pprint(val) +llby.io.pprint(ext) diff --git a/tests/wss.lua b/tests/wss.lua index d6383a1..f9ecfbd 100644 --- a/tests/wss.lua +++ b/tests/wss.lua @@ -1,6 +1,13 @@ llby = require("lullaby") -local ws = llby.net.wss("echo.websocket.org:443") +local ws, error = llby.net.wss("echo.websocket.org:4432") + +if ws == nil then + print(error) + os.exit(12) +end + +print(ws) for i=1,10 do local c = ws:read().content -- cgit v1.2.3