Http:close()

Close the HTTP client connection.

  • Remember to close the connection when no more needed.
  • A closed Http object instance can not be used anymore.
  • Http:close() is called before garbage collection, but this behaviour cannot be predicted

Return value

This function returns no value.

Example

local net = require "net" local url = "https://www.luart.org" local client = net.Http(url) print("Connected to "..url) -- closes the connection client:close()