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

[Feature request] Support for rest-client.env.json and rest-client.private.env.json

Open luislobo opened this issue 7 years ago • 15 comments

Having a team that work on both WebStorm/PhpStorm and VS Code, finding a way to be compatible is always desirable.

We started using http/rest files for some of our stuff, and we would like to be able to have our environments configured also in a way where we can share them.

PhpStorm/WebStorm supports having rest-client.env.json and rest-client.private.env.json for this very exact reason.

Is there a way that it can be added also to VS Code Rest Client?

You can check more details here https://www.jetbrains.com/help/webstorm/http-client-in-product-code-editor.html#using_env_vars

luislobo avatar Jul 27 '18 16:07 luislobo

@luislobo interesting idea, I will consider this feature carefully.

Huachao avatar Aug 31 '18 23:08 Huachao

Is there any progress? Sometimes switching between several editors can be painful.

sohaha avatar Apr 01 '20 10:04 sohaha

Please add this feature

Miuler avatar Apr 01 '20 12:04 Miuler

This would be great for our team that's split between PyCharm and VSCode - is there any way we can help out? Would a draft PR be helpful or does this need more architectural thought before code can be written?

cvburgess avatar May 11 '20 14:05 cvburgess

Please add this feature

Miuler avatar Aug 07 '20 16:08 Miuler

If you do want this, you may start a bounty (maybe on bountysource.com). Then other people may get more motivation to implement it.

QuantumGhost avatar Aug 08 '20 04:08 QuantumGhost

Bumping this, we also need this on our team

fguille94 avatar Apr 30 '21 16:04 fguille94

Bump! This would be very useful!

ghost avatar Jun 11 '21 09:06 ghost

use this extension, it has better compatibility: https://httpyac.github.io/

Miuler avatar Sep 13 '21 20:09 Miuler

use this extension, it has better compatibility: https://httpyac.github.io/

Miuler avatar Sep 13 '21 20:09 Miuler

use this extension, it has better compatibility: https://httpyac.github.io/

thiis can read http-client.private.env.json

xcrossed avatar Sep 15 '21 02:09 xcrossed

For anyone interested in implementing this, the file is now http-client.env.json and http-client.private.env.json. Updated link to JetBrains documentation: https://www.jetbrains.com/help/webstorm/exploring-http-syntax.html#environment-variables.

willnationsdev avatar Oct 01 '24 16:10 willnationsdev

Note that Visual Studio supports http-client.env.json for "public" file and http-client.env.json.user for user-specific/private settings: https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-9.0#user-specific-environment-files.

Since it seems both JetBrains and VS agrees on the "public" file, maybe a config option for the name of the private file would help support either case.

philipmat avatar Feb 05 '25 18:02 philipmat

Note that Visual Studio supports http-client.env.json for "public" file and http-client.env.json.user for user-specific/private settings: https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-9.0#user-specific-environment-files.

Since it seems both JetBrains and VS agrees on the "public" file, maybe a config option for the name of the private file would help support either case.

We picked http-client.env.json.user because .user is excluded from source control for VS users. In this case I'm not sure if you need a setting because these are user specific. If the REST Client supported http-client.private.env.json I think that would make the most sense. Having a config for it would be useful only when the same user is using different tools, which I think is a minority scenario.

sayedihashimi avatar Feb 06 '25 17:02 sayedihashimi

Note that Visual Studio supports http-client.env.json for "public" file and http-client.env.json.user for user-specific/private settings: https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-9.0#user-specific-environment-files.

Since it seems both JetBrains and VS agrees on the "public" file, maybe a config option for the name of the private file would help support either case.

A separate setting would be optimal here. By default they would be http-client.env.json and http-client.private.env.json, but could be changed in the settings.

StandBackBurrito avatar Sep 09 '25 00:09 StandBackBurrito