summaryrefslogtreecommitdiff
path: root/tests/test-sio-http-client.lua
blob: 21d0034bd476d63976b3585d05c7a2768eedb1a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
-- See LICENSE file for copyright and license details.
local sio = require "luxio.simple"

sock = assert(sio.connect("www.rjek.com", "http"))
print(sock)

assert(sock:write "GET / HTTP/1.1\r\nHost: www.rjek.com\r\nConnection: close\r\n\r\n")

print(assert(sock:read "*a"))

assert(sock:close())