diff options
| author | amelia squires <[email protected]> | 2025-02-24 13:23:19 -0600 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2025-02-24 13:23:19 -0600 |
| commit | 059503257523bf24b31f7f15a8a5761f2e5f2313 (patch) | |
| tree | 88af046d5ea16489cc045a222b4a520e557aa5b0 /tests | |
| parent | 89a7743c1c6dbfe57c70b15ec948ade582925d3e (diff) | |
error handling and parse_url on srequest
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/https.lua | 5 | ||||
| -rw-r--r-- | tests/wss.lua | 9 |
2 files changed, 13 insertions, 1 deletions
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 |
