vscode-restclient icon indicating copy to clipboard operation
vscode-restclient copied to clipboard

system environment into rest environment

Open hakanostrom opened this issue 2 years ago • 2 comments

It does not seem to work under Windows to import system variables into rest-client.environmentVariables.

USERNAME is a windows env-var and I want to include it in an restClient-environment-variable. Like so

"rest-client.environmentVariables": {
    "$shared": {
        "version": "v1"
    },
    "local": {
        "authName": "USERNAME"
    }
}

hakanostrom avatar Feb 28 '22 10:02 hakanostrom

instead use {{$processEnv USERNAME}}

example from readme.md

  GET https://{{host}}/{{version}}/values/item1?user={{$processEnv USERNAME}}
  Authorization: {{$processEnv PRODSECRET}}

AnWeber avatar Feb 28 '22 20:02 AnWeber

Yes, this works. But I optimally wanted to insert it amongst the environemnt variables, not directly with the request. That didn´t work. But maybee it is not possible?

hakanostrom avatar Feb 28 '22 20:02 hakanostrom