It would be great if it were possible to use an [%]envVarName option with {{dotenv}} in the same way that {{$processEnv}} [%]envVarName works. This would allow .env files to include values for multiple REST Client environments.
For example:
settings.json
"rest-client.environmentVariables": {
"$shared": {},
"local": {
"esUri": "http://localhost:9200",
"esUser": "elastic",
"esPass": "LOCALSECRET"
},
"dev": {
"esUri": "http://dev.example.com:9201",
"esUser": "root",
"esPass": "DEVSECRET"
},
.env
LOCALSECRET=changeme
DEVSECRET=ljqoie924
elasticsearch.http
### cluster health
GET {{esUri}}/_cluster/health?pretty=true
Authorization: Basic {{esUser}} {{$dotenv %esPASS}}
@mchelen I have supported this and will publish this in the next release
Any chance of a new release being published soon? Really excited to have this feature available for our team!
@mchelen maybe some time this week
@mchelen you can try this in the latest version 0.23.2
Most helpful comment
@mchelen maybe some time this week