treagod / spectator

Client to test web endpoints
https://treagod.github.io/spectator/
GNU General Public License v3.0
77 stars 6 forks source link

[Request] Variables support #58

Closed btd1337 closed 3 years ago

btd1337 commented 3 years ago

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/

treagod commented 3 years ago

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!

treagod commented 3 years ago

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.

treagod commented 3 years ago

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.