Skip to content

Files

Latest commit

Christophe DelordChristophe Delord
Christophe Delord
and
Christophe Delord
Feb 25, 2025
57d2b92 · Feb 25, 2025

History

History
27 lines (21 loc) · 645 Bytes

curl.md

File metadata and controls

27 lines (21 loc) · 645 Bytes

Simple curl interface

local curl = require "curl"

curl provides functions to execute curl. curl must be installed separately.

curl.request(...)

Execute curl with arguments ... and returns the output of curl (stdout). Arguments can be a nested list (it will be flattened). In case of error, curl returns nil, an error message and an error code (see curl man page).

curl(...)

Like curl(...) with some default options:

  • --silent: silent mode
  • --show-error: show an error message if it fails
  • --location: follow redirections