curl

curl sends HTTP/HTTPS requests from the hosting account, shows status, headers and body, submits methods, data, cookies and Basic Auth, and can save or open the response in an editor.

NetworkVersion 1.2.4Stable
lil-terminal

Overview

Use curl when the important question is how a remote endpoint behaves from the server itself. It is useful for API checks, redirects, response headers, IPv4/IPv6 diagnostics and downloading a response without a system shell.

Request, response and execution point

curl runs on the hosting server, not in your local browser. Start with a simple GET or headers-only request, then add a body, authentication or diagnostic flags deliberately; -k intentionally disables certificate verification.

Syntax

lil-terminal
curl <url|host|me> [options]

Reference

curl me

use the current host

curl example.com

send a GET request and show status and body

curl example.com -I

show the final response headers only

curl example.com -s [file]

save the response; use the URL filename when omitted

curl example.com -X POST -d "a=1"

send a request body

-X <method>

set the HTTP method

-d <data>

set the request body; defaults to POST

-H "Name: value"

add a request header; may be repeated

-u <user>

use HTTP Basic authentication through a hidden password prompt

-c '{"name":"value"}'

send cookies from a JSON object

-s [file] | -o <file>

save the response on the host

-a

append instead of replacing; requires -s or -o

-i

include final response headers

-I

show final response headers only

-j

show status, URL, headers and body as structured JSON

-edit @edit

open the response body in the text editor through .lil.tmp

-code @code

open the response body in the code editor through .lil.tmp

-t [seconds]

use 5 seconds or a custom timeout from 1 to 300

-T

use a 300-second timeout

-4 | -6

use IPv4 or IPv6 when cURL is available

-k

allow an insecure TLS certificate

-r

do not follow redirects

JSON and editor modes

-j always returns one predictable JSON object. If the body itself is valid JSON, the body field contains the parsed value; otherwise it contains text. -edit and -code write the response body to the protected core-root buffer .lil.tmp and immediately open it in the selected installed editor. The buffer is cleared by exit, kill and kill -cache.

Safety

TLS certificates and redirects are handled safely by default. Use -k or -r only deliberately. Editor modes are for textual responses only and cannot be combined with -s or -o.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Inspect headers, then save a response

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install curl
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install curl -m
Exact public version

Install exactly this published version.

install curl -v 1.2.4
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade curl
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install curl -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Inspect headers, then save a response
curl https://example.com -I | curl https://example.com/feed.xml -o sandbox/tmp/feed-copy.xml
HTTP/2 200
content-type: text/html; charset=UTF-8
content-length: 1256

sandbox/tmp/
  feed-copy.xml
Send a GET request and show status and body
curl https://example.com
HTTP  200
URL   https://example.com/

<!doctype html>
<html>
<head><title>Example Domain</title></head>
<body>…</body>
</html>
Show the final response headers only
curl https://example.com -I
HTTP/2 200
content-type: text/html; charset=UTF-8
cache-control: max-age=86000
content-length: 1256
Include final response headers
curl https://example.com -i
HTTP/2 200
content-type: text/html; charset=UTF-8

<!doctype html>
<html>…</html>
Add a request header; may be repeated
curl https://example.com/api -H "Accept: application/json"
HTTP  200
URL   https://example.com/api

{"status":"ok","service":"example"}
Send a request body
curl https://example.com/api -X POST -d "name=lil"
HTTP  200
URL   https://example.com/api

{"saved":true,"name":"lil"}
Send cookies from a JSON object
curl https://example.com -c '{"theme":"dark"}'
HTTP  200
URL   https://example.com/

<!doctype html>
<html data-theme="dark">…</html>
Save the response on the host
curl https://example.com/feed.xml -o sandbox/tmp/feed.xml
sandbox/tmp/
  feed.xml
Use the current host
curl me
HTTP  200
URL   https://lil.dog/

<!doctype html>
<html>…</html>
Use IPv4 or IPv6 when cURL is available
curl https://example.com -6
HTTP  200
URL   https://example.com/

<!doctype html>
<html>…</html>
Do not follow redirects
curl https://example.com -r
HTTP  200
URL   https://example.com/

<!doctype html>
<html>…</html>
Use IPv4 or IPv6 when cURL is available
curl https://example.com -4
HTTP/2 200
content-type: application/json
content-length: 128
Reject an unsupported protocol
curl ftp://example.com
Invalid URL

Related documentation

Current public release

v1.2.42026-08-11

Language synchronization

Finalizes Local and Server Help synchronization and localization safety for curl.