summaryrefslogtreecommitdiff
path: root/tests/test-sio-http-client.lua
blob: 18279ea24249803bffb852fc5f268e3a760a9b9e (plain)
1
2
3
4
5
6
7
8
9
10
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())