lua-resty-http
lua-resty-http copied to clipboard
Headers fetching...
As in PHP (get_headers), do I have a chance to fetch only the header information? I don't want a longer response time because I don't need body data
Yes, please see "Streamed request" here: https://github.com/ledgetech/lua-resty-http#streamed-request
Specifically, if you connect
manually and use the request
method (instead of request_uri
), you will receive just the status and headers, with the body ready to stream if you choose to.