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

Implement input function for Bruno GUI #3891

Open
1 task done
jthln opened this issue Jan 27, 2025 · 0 comments
Open
1 task done

Implement input function for Bruno GUI #3891

jthln opened this issue Jan 27, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request triage-pending Triage Pending

Comments

@jthln
Copy link

jthln commented Jan 27, 2025

I have checked the following:

  • I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add

It would be helpful, if we could ask for user input in pre-request/post-response sections of the Bruno GUI somehow.

I tried some approaches, but to no avail so far (not a frontend developer, please bear with me):

  • Javascript prompt does not work (prompt is not defined)
  • Installing and using npm prompt-sync does not work (ENXIO: no such device or address, open '/dev/tty')
script:pre-request {
  const prompt = require('prompt-sync')();
  const answer = prompt('Please enter firstname:');
  console.log(`You entered: ${answer}`);
}
  • Installing and using npm readline does not work (Operation not allowed on contextified object.)
script:pre-request {
  const readline = require('readline');
  const rli = readline.createInterface({
    input: process.stdin,
    output: process.stdout
  });
  rli.question('Please enter firstname: ', (answer) => {
    console.log(`You entered: ${answer}`);
    rli.close();
  });
}

Mockups or Images of the feature

Image

@jthln jthln added the enhancement New feature or request label Jan 27, 2025
@anusree-bruno anusree-bruno self-assigned this Jan 28, 2025
@anusree-bruno anusree-bruno added the triage-pending Triage Pending label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage-pending Triage Pending
Projects
None yet
Development

No branches or pull requests

2 participants