[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [5.1.4] Recommended way to work with Telnet server?
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Tue, 22 Feb 2011 16:44:24 +0100
2011/2/22 Gilles Ganault <firstname.lastname@example.org>:
> I guess using the HTTP connection would be easier than Telnet. I've
> been googling for half an hour but haven't found an example that shows
> how to handle cookies. Does someone know if LuaSocket supports them,
> or is there an add-on that I could use with LuaSocket?
Cookies are just HTTP headers. You can use the LuaSocket http module
to do the requests, it gives you direct access to outgoing and
incoming headers. Parsing the cookie actual content is then just a few
string.match calls away.