HttpCurl Lua Reference Documentation

chilkat.HttpCurl

Current Version: 11.7.0

Markdown version of this page for AI tools (v 11.7.0) · all AI docs

curl-style HTTP requests with dependency resolution

Run curl commands and automatically resolve values needed by later requests

The Chilkat.HttpCurl class executes HTTP requests expressed as curl commands, with support for variable substitution, reusable curl functions, automatic dependency resolution, response extraction, and structured diagnostics.

Variables such as {{access_token}}, {{site_id}}, or {{drive_id}} can appear in URLs, headers, query parameters, request bodies, the JSON paths that extract values from a response, and the local file path a response is written to. If a variable is not yet known, HttpCurl can build an execution plan from previously defined curl functions, run the prerequisite requests, extract values from JSON responses, and then execute the final target request.

Define dependencies Use AddFunction with AddOutput or AddOutput2.
Manage variables Use SetVar, GetVar, ClearVar, and GetAllVars.
Preview execution Use ExaminePlan or ToRawRequest before sending.
Read responses Get text, binary, JSON, XML, or stream directly to a file.

After DoYourThing completes, check StatusCode and retrieve the response using the appropriate getter. If something fails, FailReason, FailedCurl, and LastErrorText help identify the failed step and the reason.

Note: Chilkat.HttpCurl is not derived from curl/libcurl and does not wrap libcurl. It accepts curl-style command text and executes the request using Chilkat’s own HTTP implementation.

Object Creation

local chilkat = require("chilkat")

local http_curl = chilkat.HttpCurl.new()
local http_curl = chilkat.HttpCurl.new()

Creates the object (chilkat.HttpCurl() does the same). Lua's garbage collector frees it when it is no longer referenced; http_curl:dispose() frees it at once, and in Lua 5.4 and later local http_curl <close> = chilkat.HttpCurl.new() frees it when the block ends. Calling a method of a disposed object raises an error.

Errors

A method that fails returns nil followed by the error text, as io.open does: local body, err = http_curl:method(...), where err is the object's last_error_text. Wrap the call in assert() to raise an error with that text instead. Methods that answer a question return true or false, numbers are returned as they are (check last_method_success where the description says a value means failure), and property reads and writes never fail for Chilkat reasons.

Misuse raises a Lua error: a wrong argument type or a missing argument (bad argument #1 to ...), an unknown property name, a write to a read-only property, an out-of-range integer, or an object of the wrong class.

Names are Chilkat's in snake_case: QuickGetStr is quick_get_str, LastErrorText is last_error_text. Properties are fields (http_curl.verbose_logging = true) and methods use the colon (http_curl:method(...)). Strings are UTF-8; binary data is a Lua string of bytes. Indexes are 0-based, as in every Chilkat API. Unlocking: call chilkat.unlock_bundle("...") once at startup.

Properties

DebugLogFilePath
-- strVal is a string
local strVal = http_curl.debug_log_file_path
http_curl.debug_log_file_path = strVal

If set to a file path, this property logs the LastErrorText of each Chilkat method or property call to the specified file. This logging helps identify the context and history of Chilkat calls leading up to any crash or hang, aiding in debugging.

Enabling the VerboseLogging property provides more detailed information. This property is mainly used for debugging rare instances where a Chilkat method call causes a hang or crash, which should generally not happen.

Possible causes of hangs include:

  • A timeout property set to 0, indicating an infinite timeout.
  • A hang occurring within an event callback in the application code.
  • An internal bug in the Chilkat code causing the hang.

More Information and Examples
top
EnableBodyVars
-- boolVal is a boolean
local boolVal = http_curl.enable_body_vars
http_curl.enable_body_vars = boolVal
Introduced in version 11.5.0

Enables variable substitution in the body of the request. The default value is true.

top
FailedCurl
-- strVal is a string (read-only)
local strVal = http_curl.failed_curl
Introduced in version 11.5.0

Set to the specific curl command in the execution plan that failed.

top
FailReason
-- intVal is an integer (read-only)
local intVal = http_curl.fail_reason
Introduced in version 11.5.0

Set to an integer value indicating the reason for failure for the methods DoYourThing and ExaminePlan

Possible values are:

  1. No error - the method succeeded or hasn't yet been called.
  2. curl command syntax error.
  3. HTTP response status code indidcates an authentication (401) or authorization (403) error.
  4. HTTP response status code indicates an error, but not an authentication or authorization error.
  5. HTTP communications failure.
  6. Impossible to derive an execution plan from defined outputs and inputs.
  7. A step in the execution plan did not resolve any dependency variables.
  8. Failed to get curl data from a local file source (see the note below).
  9. If we are within a Chilkat.Js context and don't have permission to read the local filesystem.
  10. Chilkat has not been successfully unlocked by previously and successfully calling UnlockBundle.
  11. Failed to open or create the local output file (if a curl option directed output to a file).
  12. The response body is compressed with a Content-Encoding Chilkat cannot decode, such as Brotli (br) or zstd, so it is unusable. gzip and deflate are decoded automatically. (Introduced in v11.7.0.)

Note: curl can read data from a local file and send it in a request (usually POST/PUT) using special syntax:

  • -d @file.txt → reads the file and sends it as request body (form-style encoding).
  • --data-binary @file.bin → sends raw file contents exactly as-is.
  • -F "file=@file.txt" → uploads the file as multipart/form-data.

The @ tells curl to load the data from a local file instead of using a literal string.

top
HeartbeatMs
-- intVal is an integer
local intVal = http_curl.heartbeat_ms
http_curl.heartbeat_ms = intVal
Introduced in version 11.5.0

Specifies the interval, in milliseconds, between AbortCheck event callbacks.

This allows an application to periodically decide whether a long-running operation should be aborted.

The default value is 0, which means no AbortCheck callbacks are generated.

top
LastErrorHtml
-- strVal is a string (read-only)
local strVal = http_curl.last_error_html

Provides HTML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.

top
LastErrorText
-- strVal is a string (read-only)
local strVal = http_curl.last_error_text

Provides plain text information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.

top
LastErrorXml
-- strVal is a string (read-only)
local strVal = http_curl.last_error_xml

Provides XML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.

top
LastMethodSuccess
-- boolVal is a boolean
local boolVal = http_curl.last_method_success
http_curl.last_method_success = boolVal

Indicates the success or failure of the most recent method call: true means success, false means failure. This property remains unchanged by property setters or getters. This method is present to address challenges in checking for null or Nothing returns in certain programming languages. Note: This property does not apply to methods that return integer values or to boolean-returning methods where the boolean does not indicate success or failure.

top
ResponseBodyStr
-- strVal is a string (read-only)
local strVal = http_curl.response_body_str
Introduced in version 11.5.0

Returns the HTTP response body from the last call to DoYourThing .

top
ResponseFilePath
-- strVal is a string
local strVal = http_curl.response_file_path
http_curl.response_file_path = strVal
Introduced in version 11.5.0

Set this property to the path of a file to stream the response body to a file. If the response is streamed to a file, it will not be available in ResponseBodyStr , GetResponseSb , or GetResponseBd .

top
ResponseHeader
-- strVal is a string (read-only)
local strVal = http_curl.response_header
Introduced in version 11.7.0

Returns the HTTP response header from the last call to DoYourThing: the status line (such as HTTP/1.1 200 OK) followed by the header fields, with CRLF line endings. Empty if no response was received. When redirects were followed (-L), this is the header of the final response. To get a single field, use GetResponseHeaderField. The curl -D/--dump-header option writes the header of every response (including redirects) to a file, and -i/--include writes the header before the body in the -o/-O output file; neither changes this property or the response body returned in memory.

top
StatusCode
-- intVal is an integer (read-only)
local intVal = http_curl.status_code
Introduced in version 11.5.0

Returns the HTTP status code from the last call to DoYourThing. A value of 0 indicates no response header was received.

top
UncommonOptions
-- strVal is a string
local strVal = http_curl.uncommon_options
http_curl.uncommon_options = strVal
Introduced in version 11.5.0

Provides a comma-separated list of uncommon option keywords.

This property defaults to an empty string and should normally remain empty.

Can be set to a list of the following comma separated keywords:

  • IgnoreUnknownCurlOptions - Introduced in v11.7.0. Starting in v11.7.0, a curl option that HttpCurl does not recognize causes DoYourThing to fail with a syntax error (FailReason = 1) naming the option in LastErrorText, rather than being silently dropped as in earlier versions. (Options that are meaningless to HttpCurl but harmless, such as --progress-bar or --retry, are accepted and ignored.) This keyword restores the earlier behavior: an unknown option is skipped with a note in LastErrorText. Note that the value of an unknown option that takes one is then seen as a stray token.

top
VerboseLogging
-- boolVal is a boolean
local boolVal = http_curl.verbose_logging
http_curl.verbose_logging = boolVal

If set to true, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is false. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.

top
Version
-- strVal is a string (read-only)
local strVal = http_curl.version

Version of the component/library, such as "10.1.0"

More Information and Examples
top

Methods

AddFunction
-- func_name is a string
-- curl is a string
-- ok is true, or nil and err on failure
local ok, err = http_curl:add_function(func_name, curl)
Introduced in version 11.5.0

Adds a named curl function that can be used in dependency resolution. Inputs required by the curl function are indicated by the variable names enclosed in {{ and }}. Outputs are defined in one or more calls to AddOutput .

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

More Information and Examples
top
AddOutput
-- func_name is a string
-- json_path is a string
-- var_name is a string
-- ok is true, or nil and err on failure
local ok, err = http_curl:add_output(func_name, json_path, var_name)
Introduced in version 11.5.0

Adds or updates a defined output for a dependency resolution curl function previously defined by calling AddFunction. The json_path is the JSON path in the JSON response body where the var_name's value is located. If either the func_name or json_path already exist for the func_name, then the output is updated.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

More Information and Examples
top
AddOutput2
-- func_name is a string
-- array_path is a string
-- where_path is a string
-- where_value is a string
-- case_sensitive is a boolean
-- sub_path is a string
-- var_name is a string
-- ok is true, or nil and err on failure
local ok, err = http_curl:add_output2(func_name, array_path, where_path, where_value, case_sensitive, sub_path, var_name)
Introduced in version 11.5.0

Adds or updates an output variable definition for a dependency-resolution curl function previously created by calling AddFunction. Use this method when the curl response is JSON containing an array of objects, and a value needs to be extracted from one specific array element.

The method searches the array located at arrayPath, finds the array element where the value at wherePath matches whereValue, and then extracts the value at subPath. The extracted value is assigned to the variable named by varName.

The wherePath and subPath values are paths relative to each individual array element. The comparison between whereValue and the JSON value found at wherePath is either case-sensitive or case-insensitive depending on the value of caseSensitive.

Parameters

  • funcName — The name of the curl function previously added by calling AddFunction. The output definition is associated with this function.
  • arrayPath — The JSON path identifying the array of records within the JSON response. May contain variable references (see below).
  • wherePath — A relative JSON path within each array element used to locate the matching record. May contain variable references (see below).
  • whereValue — The value to match against the JSON value found at wherePath. May contain variable references (see below).
  • caseSensitive — If true, the comparison between whereValue and the JSON value is case-sensitive. If false, the comparison is case-insensitive.
  • subPath — A relative JSON path within the matched array element identifying the value to extract. May contain variable references (see below).
  • varName — The name of the variable that will receive the extracted value.

Variable references

Starting in v11.7.0, the arrayPath, wherePath, whereValue and subPath may each contain variable names enclosed in {{ and }}, such as {{site_name}}, either on their own or within a longer string such as result.{{list_name}}.items. Each is stored exactly as passed here, and the references in it are resolved every time this output is evaluated — not when AddOutput2 is called. A variable whose value is set later by SetVar, or that is produced as the output of another curl function, is therefore used with its current value.

A variable referenced here is treated as an input of the curl function, exactly like one appearing in the curl command itself, so the execution plan runs whatever produces it first. If a referenced variable has no value and nothing can produce it, the reference is left in place, no array element matches, and the LastErrorText reports the failure with both the resolved and the unresolved form of the record spec.

Example

Given the following JSON response:

{
  "drives": [
    {
      "name": "Documents",
      "id": "A123"
    },
    {
      "name": "Shared",
      "id": "B456"
    }
  ]
}

The following call:

AddOutput2("GetDrive","drives","name","shared",false,"id","drive_id")

searches the drives array for the element whose name matches "shared" using case-insensitive comparison. The matching element is:

{
  "name": "Shared",
  "id": "B456"
}

The value of id is extracted and assigned to the variable drive_id, resulting in:

drive_id = "B456"

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
AddTargetOutput
-- json_path is a string
-- var_name is a string
http_curl:add_target_output(json_path, var_name)
Introduced in version 11.5.0

Adds an automatically mapped variable for the target curl command. When a JSON response is received from a curl request, the value at the JSON path specified by json_path is extracted (if present) and assigned to the variable named by var_name.

This is useful in common workflows where one request returns an identifier (such as an `id`) that must be reused in a subsequent curl request.

More Information and Examples
top
ClearTargetOutput
-- var_name is a string
http_curl:clear_target_output(var_name)
Introduced in version 11.5.0

Clears (undefines) the target output for the specified var_name. If var_name equals "*", then all target outputs are cleared.

top
ClearVar
-- var_name is a string
http_curl:clear_var(var_name)
Introduced in version 11.5.0

Undefines the variable with the specified name. If var_name equals "*", then all variables are cleared.

top
DoYourThing
-- target_curl is a string
-- ok is true, or nil and err on failure
local ok, err = http_curl:do_your_thing(target_curl)
Introduced in version 11.5.0

Runs a the targetCurl command specified in target_curl. If the targetCurl contains variable names enclosed in {{ and }}, then an execution plan is constructed from defined functions and outputs to resolve unknown variables, and the execution plan is run. The final step in the execution plan is always the targetCurl command.

Returns success (true) if a response was received, in which case the response status code will be available in StatusCode and the content of the response body will be available in one of two places:

Assuming the HTTP response is JSON, the target outputs (variables) specified by prior calls to AddTargetOutput will be populated by applying each variable's JSON path to the response JSON.

Writing the response to a local file

A curl command may write the response body to a local file with -o / --output (an explicit filename), or with -O / --remote-name (the filename is the final path segment of the URL). Either may be combined with --output-dir, which, as in curl, is applied only when the filename itself contains no directory separator.

Starting in v11.7.0, the output file path may contain variable names enclosed in {{ and }}, resolved from the current variable values at the time the request is sent. This applies to the path given with -o, the directory given with --output-dir, and the URL that -O derives a filename from. In previous versions the path was used exactly as written, so -o "{{report_name}}.pdf" created a file literally named {{report_name}}.pdf and reported success.

httpCurl.SetVar("customer","acme");
httpCurl.SetVar("report_name","q3-summary");
httpCurl.DoYourThing("curl https://api.example.com/reports/{{report_name}} "
    "--output-dir \"reports/{{customer}}\" -o \"{{report_name}}.pdf\"");
// writes reports/acme/q3-summary.pdf

Two conditions cause the request to fail rather than write a file:

  • The resolved path still contains a {{varName}} reference, or a variable in it resolved to an empty string. (Elsewhere -- in a URL or a request body -- an unresolved reference is left in place. In a file path that would silently create a misnamed file.)
  • A variable substituted into the path has a value containing a .. directory segment. Because a variable's value can come from a server's response (see AddOutput and AddOutput2), a response must not be able to move the output file out of the directory the curl command named. A .. written literally in the curl command itself is the application's own choice and is allowed.

The path as it will actually be used is written to LastErrorText as resolvedOutputPath.

This is independent of the ResponseFilePath property, which streams the response body to a file for requests whose curl command names no output file.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
ExaminePlan
-- curl is a string
-- json is a chilkat.JsonObject
-- ok is true, or nil and err on failure
local ok, err = http_curl:examine_plan(curl, json)
Introduced in version 11.5.0

Used for debugging. Returns in json the plan of execution that would occur for the curl based on the variables that are either unknown or already known. The plan of execution is what would occur if DoYourThing was called with the current state of knowledge.

If no execution plan is possible with the current known inputs and outputs, then json provides information about what is missing and the method returns false.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
GetAllVars
-- json is a chilkat.JsonObject
http_curl:get_all_vars(json)
Introduced in version 11.5.0

Returns all defined variables in json.

More Information and Examples
top
GetResponseBd
-- bd is a chilkat.BinData
-- ok is true, or nil and err on failure
local ok, err = http_curl:get_response_bd(bd)
Introduced in version 11.5.0

Appends to bd the HTTP response body from the last call to DoYourThing.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
GetResponseHeaderField
-- name is a string
-- str is a string, or nil and err on failure
local str, err = http_curl:get_response_header_field(name)
Introduced in version 11.7.0

Returns the value of the response header field named name (case-insensitive) from the last call to DoYourThing, such as "Content-Type" or "ETag". Returns an empty string if the response has no such field. When redirects were followed (-L), the field is from the final response. The full response header is available in ResponseHeader.

Returns the string, or nil, err on failure (or when nothing is found). The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
GetResponseJarr
-- jarr is a chilkat.JsonArray
-- ok is true, or nil and err on failure
local ok, err = http_curl:get_response_jarr(jarr)
Introduced in version 11.5.0

Writes to jarr the HTTP response body from the last call to DoYourThing.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
GetResponseJson
-- json is a chilkat.JsonObject
-- ok is true, or nil and err on failure
local ok, err = http_curl:get_response_json(json)
Introduced in version 11.5.0

Writes to json the HTTP response body from the last call to DoYourThing.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
GetResponseSb
-- sb is a chilkat.StringBuilder
-- ok is true, or nil and err on failure
local ok, err = http_curl:get_response_sb(sb)
Introduced in version 11.5.0

Appends to sb the HTTP response body from the last call to DoYourThing.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
GetResponseXml
-- xml is a chilkat.Xml
-- ok is true, or nil and err on failure
local ok, err = http_curl:get_response_xml(xml)
Introduced in version 11.5.0

Writes to xml the HTTP response body from the last call to DoYourThing.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
GetVar
-- var_name is a string
-- str is a string, or nil and err on failure
local str, err = http_curl:get_var(var_name)
Introduced in version 11.5.0

Retrieves the current value of the variable specified by var_name.

Returns the string, or nil, err on failure (or when nothing is found). The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
SetAuth
-- json is a chilkat.JsonObject
-- ok is true, or nil and err on failure
local ok, err = http_curl:set_auth(json)
Introduced in version 11.5.0

Sets authorization information that is applied to all calls to DoYourThing . See the examples below for details.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
SetVar
-- var_name is a string
-- var_value is a string
http_curl:set_var(var_name, var_value)
Introduced in version 11.5.0

Sets the value of a variable to be replaced in curl commands. Variable names are enclosed in {{ and }} and can occur in the path, query params, or the body of the request. Starting in v11.7.0, they can also occur in the arrayPath, wherePath, whereValue and subPath passed to AddOutput2, and in the local output file path of a curl command -- the path given with -o or --output, the directory given with --output-dir, and the URL that -O derives a filename from. See DoYourThing .

top
ToRawRequest
-- curl_command is a string
-- sb is a chilkat.StringBuilder
-- ok is true, or nil and err on failure
local ok, err = http_curl:to_raw_request(curl_command, sb)
Introduced in version 11.5.0

Used for debugging purposes. This method behaves the same as DoYourThing , but only converts the curl_command to an HTTP request message in sb containing the full structure:

  • start line
  • headers
  • optional body or multipart body

It does not actually send the HTTP request.

Returns true on success, nil, err on failure. The second return value, err, is the object's last_error_text; wrap the call in assert() to raise an error instead.

top
VarDefined
-- var_name is a string
-- flag is true or false
local flag = http_curl:var_defined(var_name)
Introduced in version 11.5.0

Returns true if the var_name is defined, otherwise returns false. Setting var_name to "!" checks whether all target output variables have been defined. It returns true if every target output is set, and false if any are missing.

Returns true or false: an answer, not a success flag.

top

Events

All Chilkat methods are synchronous: the call returns when the work is done. During a long-running call, chilkat.HttpCurl reports progress to the functions given to set_event_handler, in a table keyed by event name (plain functions, not methods: closures carry whatever state they need):

http_curl:set_event_handler({
    percent_done  = function(pct) print(pct .. "%") end,              -- return true to abort
    progress_info = function(name, value) print(name, value) end,
})
http_curl.heartbeat_ms = 250   -- abort_check is called 4 times per second
http_curl:set_event_handler({ event_name = function(...) ... end, ... })

Installs the handlers, replacing any installed before; http_curl:set_event_handler(nil) removes them. The event names are checked when the table is installed: a misspelled one raises an error.

The abort_check handler is called at the interval set by the heartbeat_ms property (0, the default, disables it); percent_done is called when an operation's completion percentage is known; progress_info delivers named progress values. A true return from abort_check or percent_done aborts the running method, which then fails in the usual way (nil, err). An error raised in a handler aborts the method and is raised again from the method call; the object remains usable.

AbortCheck
-- handler: function() ... return abort end -- a true return aborts the method in progress
http_curl:set_event_handler({ abort_check = function() ... end })

Enables a method call to be aborted by triggering the AbortCheck event at intervals defined by the HeartbeatMs property. If HeartbeatMs is set to its default value of 0, no events will occur. For instance, set HeartbeatMs to 200 to trigger 5 AbortCheck events per second.

More Information and Examples

Example

local deadline = os.time() + 30                  -- give up after 30 seconds
http_curl.heartbeat_ms = 250                      -- call the handler 4 times per second
http_curl:set_event_handler({ abort_check = function() return os.time() > deadline end })
top
PercentDone
-- handler: function(pct_done) ... return abort end -- a true return aborts
http_curl:set_event_handler({ percent_done = function(pct_done) ... end })

This provides the percentage completion for any method involving network communications or time-consuming processing, assuming the progress can be measured as a percentage. This event is triggered only when it's possible and logical to express the operation's progress as a percentage. The pctDone argument will range from 1 to 100. For methods that finish quickly, the number of PercentDone callbacks may vary, but the final callback will have pctDone equal to 100. For longer operations, callbacks will not exceed one per percentage point (e.g., 1, 2, 3, ..., 98, 99, 100).

The PercentDone callback also acts as an AbortCheck event. For fast methods where PercentDone fires, an AbortCheck event may not trigger since the PercentDone callback already provides an opportunity to abort. For longer operations, where time between PercentDone callbacks is extended, AbortCheck callbacks enable more responsive operation termination.

To abort the operation, set the abort output argument to true. This will cause the method to terminate and return a failure status or corresponding failure value.

More Information and Examples

Example

http_curl:set_event_handler({
    percent_done = function(pct_done)     -- 0 to 100
        print("Percent done: " .. pct_done)
        return false                       -- return true to abort the method in progress
    end,
})
top
ProgressInfo
-- handler: function(name, value) ... end
http_curl:set_event_handler({ progress_info = function(name, value) ... end })

This event callback provides tag name/value pairs that detail what occurs during a method call. To discover existing tag names, create code to handle the event, emit the pairs, and review them. Most tag names are self-explanatory.

Note: Some Chilkat methods don't fire any ProgressInfo events.

More Information and Examples

Example

http_curl:set_event_handler({
    progress_info = function(name, value) print(name .. ": " .. value) end,
})
top