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

Reading variables from env file

Open IamGiel opened this issue 2 years ago • 3 comments

First of all awesome job!

If there a way we can allow users to read variables from env variable file (for example)? A scenario: I have secret token from env file and I would like that to be read instead of writing it on the top the rest client .http file.

This is not an issue but maybe a feature we can implement.

IamGiel avatar May 17 '22 09:05 IamGiel

Not sure I understand the question. It is possible to get the token from the env file, for example you can have token defined in the env file, and then in the .http one you make a request like this:

GET {{exampleEndpoint}}/api
Authorization: {{token}}

which would use the token defined in the env file.

vkristijan avatar May 08 '23 11:05 vkristijan

might be related #1070

ufukty avatar May 12 '23 20:05 ufukty

I stumbled across the same issue.

This doesn't work image

While this works: image

docwarems avatar Apr 02 '24 10:04 docwarems