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

Support for Prompt tags #313

Open
teynar opened this issue Feb 19, 2025 · 0 comments
Open

Support for Prompt tags #313

teynar opened this issue Feb 19, 2025 · 0 comments

Comments

@teynar
Copy link

teynar commented Feb 19, 2025

One of the features that I find most useful in a http client are prompt tags. Essentially, for those who have not explored them yet, they are used as placeholder fields that require user input before a request is sent: they allows dynamic values to be entered at runtime instead of hardcoding them into the request.

I tend to use them for things like:

  • As a path param, for REST Resource Get => e.g. GET /users/b66d1a42-bd52-448a-ae63-9b69491284f0
  • As a query param => e.g. GET /search?q=vintage
  • As a body field => e.g. POST /scan-website { "websiteUrl": "https://github.com/flawiddsouza/Restfox" }
  • As a header field => e.g. Switching languages of an endpoint response through the Accept-Language header

I think that this feature would nicely align with Restfox's current design (since we already have response tags) and for its git friendly storage system. I would greatly appreciate if this could be implemented (if it is feasible), thanks for your time :)

This is how they are configured in the Insomnia client, for instance:

Title: Title is a unique string used to identify the prompt value
Label: Text on top of the input line
Default value: This value is used to pre-populate the prompt dialog, but is ALSO used when the app renders preview values (like the one below). This is to prevent the prompt from displaying too frequently during general app use.
Storage key: If this is set, the value will be stored in memory under this key until the app is closed. To force this tag to re-prompt the user, simply change this key's value to something else.
Mask text: If this is enabled, the value when input will b masked like a password field.
Default to last value: If this is enabled, the input field will be pre-filled with this value. This option is ignored when the storage key is set.

The gear button next to each field allows the variable to either be a static value or a value that comes from an environment.

insonia-prompt-configuration

insomnia-prompt-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants