daurnimator / lua-http

HTTP Library for Lua. Supports HTTP(S) 1.0, 1.1 and 2.0; client and server.
https://daurnimator.github.io/lua-http/
MIT License
778 stars 80 forks source link

Asynchronous mode #185

Closed solares closed 3 years ago

solares commented 3 years ago

My calls seem to block:

    local headers, stream = req:go(req_timeout)
    if headers == nil then
        log(tostring(stream), "\n")
    end

Are there examples of how to make this req:go non-blocking?

daurnimator commented 3 years ago

Do it from a cqueues thread.