treagod/spectator

[Request] Variables support

btd1337 opened this issue ยท 3 comments

Is It possible to add variables support?

e.g.:

// instead
http://localhost:3000/users

// use variables
=== DEV ENVIRONMENT ===
BASE_URL=http://localhost:3000

=== PROD ENVIRONMENT ===
BASE_URL=https://server.amazon.com/x2371acx

{{BASE_URL}}/users

https://learning.postman.com/docs/sending-requests/variables/

I'm currently working on it. There is a environment branch which you can check out, but there's still much to do.

Screenshot from 2021-01-11 10 59 44

But Spectator is getting there!

If you're courageous enough, the environments branch has a complete prototype with in-memory variables.

If you want to insert the variables into the URL input, press ctrl + space while the input is focused.

In case you are testing the branch out, some feedback is very welcomed.

Last update:

Its mostly done, also look at PR #59. Before I add the first step for variable support, I'll make sure that all code I'm about to merge is readable and correct.