spec/examples/variables/dynamic_vars.http $ not needed
#556
Replies: 3 comments
-
|
And why does |
Beta Was this translation helpful? Give feedback.
-
|
I think you did not grasp what the dynamic vars are. There is a set of always available variables which are prefixed with $. Your example just references a normal variable. Normal variables don't have that prefix. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @gorillamoe ! Just a further minor question, are those dynamic vars provided by rest.nvim always? Thus is next sentence true? The I found the dynamic vars example: https://github.com/rest-nvim/rest.nvim/blob/main/spec/examples/variables/dynamic_vars.http. Code: ### dynamic variables
POST https://reqres.in/api/users
Content-Type: application/json
{
"userid" : "{{$uuid}}",
"time" : "{{$timestamp}}",
"randomValue": "{{$randomInt}}",
"name": "morpheus",
"job": "leader",
"array": ["a", "b", "c"],
"object_ugly_closing": {
"some_key": "some_value"
}
}Bonus. How to get a table of custom dynamic variables https://github.com/rest-nvim/rest.nvim/blob/main/doc/rest-nvim.txt |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The
$I think it should be removed.This fails to show the baseURL in the json response
This works
.envwith just 1 line:Result of
:Rest run:What you think?
Beta Was this translation helpful? Give feedback.
All reactions