From: Daniel Stenberg Date: Sat, 14 Dec 2024 13:32:18 +0000 (+0100) Subject: variable.md: show function use with examples X-Git-Tag: curl-8_12_0~352 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9294ca89163951e1d8e949c2af964197de1be2cb;p=thirdparty%2Fcurl.git variable.md: show function use with examples Closes #15743 --- diff --git a/docs/cmdline-opts/variable.md b/docs/cmdline-opts/variable.md index 9fe0572363..d9a008ea87 100644 --- a/docs/cmdline-opts/variable.md +++ b/docs/cmdline-opts/variable.md @@ -48,11 +48,27 @@ Available functions: ## trim removes all leading and trailing white space. +Example: + + curl --expand-url https.//example.com/{{url:trim}} + ## json outputs the content using JSON string quoting rules. +Example: + + curl --expand-data {{data:json}} https://example.com + ## url shows the content URL (percent) encoded. +Example: + + curl --expand-url https://example.com/{{path:url}} + ## b64 expands the variable base64 encoded + +Example: + + curl --expand-url https://example.com/{{var:b64}}