lua-resty-http icon indicating copy to clipboard operation
lua-resty-http copied to clipboard

Headers fetching...

Open sweetngx opened this issue 3 years ago • 1 comments

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

sweetngx avatar Jan 03 '22 10:01 sweetngx

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.

pintsized avatar Jan 03 '22 10:01 pintsized