c:close

March 26, 2020 Contributors

Name

c:close — Close a curl object

Synopsis

require('curl');

c:close();

Description

Close a curl object created using curl.new; equivalent to c = nil;.

This function can be used to force closure of all resources associated with the curl object. It is called automatically when the curl object is garbage collected, so you will not typically need to call this function. After calling this function, a runtime error will result if you attempt to use the curl object.

c = curl.new();
c:setopt(curl.OPT_URL, "http://example.com/path");
c:perform();
c:close();

See Also

curl.new