-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Feature Request] Prompt for input a variable #1033
Comments
I have a handful of investigative and "repair" queries that I sometimes need to run with the Id of a specific user, for example. Which user I run the query or mutation for will never be the same twice, but I don't want to end up hard-coding the Id directly in the query. For the moment, I just have to remember to replace the Id with something bogus before saving the query for next time, but it would be a far better experience if I were prompted for the values each time I run the query. Ideally, the pop-up would remember the last value used, at least for the current session, so that I don't have to keep pasting it in each time. If I were to close the tab, the value should be forgotten, though, so I don't accidentally use the same value the next time I have to do a similar investigation. I'd be fine if there were simply a way to mark a property on the Variables tab as being transient, perhaps the "{{$" syntax suggested above. I could specify my value directly on the Variables tab, just as long as I know that when I save the query, that value will get dropped from the file or something. Whatever is easiest. I just don't want that Id to make it into the file permanently, that's all. |
This is really usefull so I could change values in query and body and it does not get carry on to other user and to my git |
Likewise, I have a lot of API requests to investigate and the IDs are always different. If the env variable is not set, there could be an option to prompt for the value. |
I would suggest adding a script method for that like |
- bru.prompt(varName, prompt) allows to specify variables that should be prompted in a pre- or post-request script
+1 to this idea The PR hasn't had any updates for a few months, is this still on the radar? |
I am also interested in this workflow, I think it would feel very natural for requests that have parameters that change a lot |
I followed exactly the steps provided to use prompts via Electron, but Bruno just shows the following error: Error invoking remote method 'send-http-request': VMError: Cannot find module 'electron' |
Fixed it - typo in bruno.json |
+1 for this. I'd prefer to not have to add dependencies and script each variable in each request. |
Is it possible to add to possibility to have a "prompt variable" ?
It's just for convienience to be able to set a variable à the request execution. For example, we could have such request :
GET : {{base_url}}/myapi/v1/mystuff/users/{{$prompt userId}}/details
And so, instead of copy/paste an id directly in the url form before the request run, we would be able to simply execute the request without modifying it, and a pop up would appear letting us set the id to replace the {{$prompt userId}} field.
Such feature exists at the moment in Insomnia. It would be very cool to have this in bruno.
The text was updated successfully, but these errors were encountered: