Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompt for undefined variables #479

Closed
mfulton26 opened this issue Jan 13, 2020 · 5 comments · Fixed by #616
Closed

Prompt for undefined variables #479

mfulton26 opened this issue Jan 13, 2020 · 5 comments · Fixed by #616

Comments

@mfulton26
Copy link

I find for some HTTP requests I use I almost always use a unique value for a variable (e.g. logId, sessionId, etc.). I usually just change the variable in the file but I think it would be even nicer if I could get prompted in a pop-up/modal/dialog window for any undefined variables, they can default to the last used value but the first time it is used it could just be blank and allow me to enter it in.

@Huachao
Copy link
Owner

Huachao commented Jan 14, 2020

@mfulton26 what do you mean undefined variables in our scope?

@NearlyUnique
Copy link

I think I have a similar user case.

I use our own apis for a lot of diagnostics against our system. So I might en up with a customer or product id and need to make queries for that but the customer or product id will change almost every time I make the query

so given

###
GET https://example.com/{{customer_id}}/more/path

How would we elegantly allow the system to (probably prompt) for the unknown value customer_id per request (or at least if no default?) has been set.

@mfulton26
Copy link
Author

yes, as @NearlyUnique describes it, I haven't placed @foo=bar anywhere but I'm using {{foo}} and it gets serialized over HTTP as undefined (or maybe the empty string, I don't recall at the moment)

instead of silently sending the request using an undefined variable I'd rather get prompted for what value to use in the request

@Huachao
Copy link
Owner

Huachao commented Mar 3, 2020

@mfulton26 @NearlyUnique sorry for the late reply, I am not sure if I totally understand your pain point, here I'd like to show you the two current offerings to help users to find out the undefined variables as following:
屏幕快照 2020-03-03 下午11 27 25
One is the red break line under the undefined variables, the other is the VSCode Problems number indicators.

@mfulton26
Copy link
Author

right, so for some requests I'll have some variable that will be unique for every single request, instead of defining the variable somewhere I'd rather get a pop-up window when I try to send the request asking me for the value of any variables in the request that are not defined, this way I can only temporarily define it for just that once when I send the request, the next time I click "Send Request" I'll get prompted/asked again for the value

@Huachao Huachao linked a pull request Jun 19, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants