parent
36a95c5163
commit
e455490c3c
@ -26,15 +26,15 @@ set:
|
||||
|
||||
When expanding variables, curl supports a set of functions that can make the
|
||||
variable contents more convenient to use. It can trim leading and trailing
|
||||
white space with *trim*, it can output the contents as a JSON quoted string
|
||||
with *json*, URL encode the string with *url* or base64 encode it with
|
||||
*b64*. You apply function to a variable expansion, add them colon separated to
|
||||
the right side of the variable. Variable content holding null bytes that are
|
||||
not encoded when expanded cause error.
|
||||
white space with `trim`, it can output the contents as a JSON quoted string
|
||||
with `json`, URL encode the string with `url` or base64 encode it with `b64`.
|
||||
To apply functions to a variable expansion, add them colon separated to the
|
||||
right side of the variable. Variable content holding null bytes that are not
|
||||
encoded when expanded cause error.
|
||||
|
||||
Example: get the contents of a file called $HOME/.secret into a variable
|
||||
called "fix". Make sure that the content is trimmed and percent-encoded sent
|
||||
as POST data:
|
||||
called "fix". Make sure that the content is trimmed and percent-encoded when
|
||||
sent as POST data:
|
||||
|
||||
--variable %HOME
|
||||
--expand-variable fix@{{HOME}}/.secret
|
||||
|
||||
Loading…
Reference in New Issue
Block a user