]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
variable.md: show function use with examples
authorDaniel Stenberg <daniel@haxx.se>
Sat, 14 Dec 2024 13:32:18 +0000 (14:32 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 14 Dec 2024 16:00:23 +0000 (17:00 +0100)
Closes #15743

docs/cmdline-opts/variable.md

index 9fe057236328c85e4bf38a8c68a34a24c1fa58a7..d9a008ea874312807fb7339a6b123c690df3d027 100644 (file)
@@ -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}}