[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] lua-http 0.2 release
- From: Russell Haley <russ.haley@...>
- Date: Tue, 30 May 2017 15:37:07 -0700
On Tue, May 30, 2017 at 1:59 PM, Hisham <h@hisham.hm> wrote:
> On 30 May 2017 at 04:54, Daurnimator <quae@daurnimator.com> wrote:
>> On 30 May 2017 at 16:49, Martin <eden_martin_fuhrspam@gmx.de> wrote:
>>> Thank you for sharing! Going to try it in forecoming project (which
>>> currently uses wget for retrieving file).
>>
>> Great! Let us know how you go :)
>>
>>> Is this module a concurrent for luasocket?
>>
>> I'm not sure what you mean by this question.
>
> I think he meant "is it a competitor" ('concorrente' in Portuguese
> translates both to 'concurrent' and 'competitor').
>
>> lua-http uses the "cqueues" library for socket operations as well as
>> concurrency.
>> However lua-http does provide a module (http.compat.socket) that
>> emulates the behaviour of luasocket's http module so that you can
>> easily swap in lua-http to an existing project.
>
> Oh, it does!? Nice! I didn't find this last time I looked at lua-http
> (late last year?) and gave up on the library while reading the
> extensive documentation and not being able to quickly find out how to
> do the equivalent to wget("http://example.com/file.tar.gz").
https://daurnimator.github.io/lua-http/0.2/#common-use-cases
https://github.com/daurnimator/lua-http/blob/master/examples/simple_request.lua
Yes, the documentation is a little impenetrable from a new user
perspective. There was a conscious decision to not include examples as
the documentation was intended more as a reference (IIRC, which I
often don't). There were/are plans for more user example documentation
but I've become somewhat side tracked. Maybe we could have pointed the
user to the examples directory, though I don't know how that gets
installed via luarocks as I usually pull from git? Anyway, all
documentation feedback including sticks and stones are gladly
welcomed. Perhaps time for a how-to section now...
Russ