http://phecoopwm6x7azx26ctuqcp6673bbqkrqfeoiz2wwk36sady5tqbdpqd.onion/posts/lua/connect-to-https-upstream-with-lua-resty-http.html
ERR , "Request Failed" ) httpc : close () return False end -- Return the connection to the keepalive pool httpc : set_keepalive () -- Check the status, dispatcher will serve us a 302 if res . status == 200 then body , err = res : read_body () return body end return False end Usage Example local res = fetch_via_https ( "www.example.invalid" , "/robots.txt" ) https lua lua-resty-http openresty Previous post Next post Contents © 2025 Ben Tasker | Privacy Policy Available at snippets.bentasker.co.uk ,...