lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I need to build a lua https client and would like to base it on the
excellent lua socket.http module and luasec. Has anyone had any luck
doing this? It seems I need to override the trequest function to pass
ssl params to a new  open function (which would wrap the original open
function). However, trequest calls functions that are local to the
socket.http module, so I would have to duplicate a bunch of code,
which I would like to avoid doing. Thanks in advance for any advice.

Could you use the "create" request field? It allows you to
pass a function that will be used to create the socket
object. As long as your object respects the standard socket
interface, http.request won't even notice.

Regards,
Diego