@@ -12,23 +12,14 @@ local ui = require "simpleui"
12
12
local ws_client = require " ws_client"
13
13
local httpc = require " http.httpc"
14
14
15
- -- print("begin https test")
16
- -- local code, res = httpc.request('GET', 'https://baidu.com')
17
- -- print("https test:" .. code .. inspect(res))
15
+ print (" begin https test" )
16
+ local code , res = httpc .request (' GET' , ' https://baidu.com' )
17
+ print (" https test:" .. code .. inspect (res ))
18
18
19
- -- print("begin http test")
20
- -- local code, res = httpc.request('GET', 'http://localhost:15672', "/cli/rabbitmqadmin")
21
- -- print("http test:" .. code .. inspect(res))
19
+ print (" begin http test" )
20
+ local code , res = httpc .request (' GET' , ' http://localhost:15672' , " /cli/rabbitmqadmin" )
21
+ print (" http test:" .. inspect (res ))
22
22
23
- -- local sep = '\r\n'
24
- -- local buf = "dsgdgf" .."\r\n" .. "ggg1111"
25
- -- print('bb:', buf)
26
-
27
- -- while not buf:find(sep, 1, true) do
28
- -- end
29
- -- local b, e, c = buf:find(sep, 1, true)
30
- -- print('ff:', b, e, buf:sub(1, b))
31
- -- print('cc:', c)
32
23
33
24
assert (ws_client .connect ())
34
25
ws_client .loop ()
0 commit comments