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
795 stars 81 forks source link

Feature Request: Simple way to serialize/output an HTTP request #151

Closed RussellHaley closed 5 years ago

RussellHaley commented 5 years ago

It may just be my use case, but it would be nice to be able to get a string of my http request that I can dump to file prior to sending, especially once https is turned on. I might be able to piece something together from the http.request:go() function, but thought I'd mention it. I looked briefly at the go function and it seems heavily intertwined with the socket connection (I suspect due to the way an http request is actually sent).

Thanks, Russ

daurnimator commented 5 years ago

Why would you want to dump it to file?

For debugging I mostly use:

See also #69

RussellHaley commented 5 years ago

Works for me! Thanks.