re: 6 VS Code Extensions That Give You Superpowers πŸ¦Έβ€β™‚οΈ VIEW POST


The REST client extension deserves much more praise. It has native support for .env variables, shorthands, all types of requests, I have completely replaced postman with this extension, as now I can store a .http file inside each repo and source control my API tests.


What I'm missing about REST client (or I didn't find out how to do it yet) is custom code.
In Postman I can log in to my service, save the token in a variable and attach the token to future API calls.

Do you happen to know if that's possible with REST client?


I would imagine you could accomplish this by making a request to get a token, add that token to your .env file, and then make sure you're adding that token to all your requests that need auth by referencing that variable with the {$dotenv variableName}.

Let me know if that made any sense at all lol

That does make sense. I'll just have to find out how to get the answer (token) to the .env file.

Code of Conduct Report abuse