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

[Feature Request] Command line switches for Insomnia #628

Closed
salaros opened this issue Nov 24, 2017 · 7 comments
Closed

[Feature Request] Command line switches for Insomnia #628

salaros opened this issue Nov 24, 2017 · 7 comments
Labels
stale Bot: Stale Issue

Comments

@salaros
Copy link

salaros commented Nov 24, 2017

As agreed with Insomnia support I'm creating this feature request with list of commands line switches I want you to implement in the first iteration. #479 is indeed too vague and is more like an epic which has to be split in smaller tasks.

  • Insomnia Version: 5.x
  • Operating System: macOS, Linux, Windows

Details

What about implementing the following functionality as part of the first commandline-related iteration:

insomnia --workspace|-w "Foo Bar" --request-id|-r 00000000aaabbbbccccc0000000` 

with these switches I would expect Insomnia to open and switch to workspace Foo Bar (not sure if it's really needed) and send the request with the following ID req_00000000aaabbbbccccc0000000

I would also like to have the second option for cases when I haven't created any workspace / request in Insomnia, so I could explicitly indicate the URL, HTTP request type, headers etc

# Calls https://api.acme.com/v1.0/users URL with Accept: application/json header
insomnia --header|-H "Accept: application/json" https://api.acme.com/v1.0/users

# Sends a PUT request to https://api.acme.com/v1.0/users URL with
# Content-Type: application/json header and some JSON-encoded data
insomnia  --request-type|-X PUT \
                --header|-H "Content-Type: application/json" \
                --data|-d '{"name":"john","email":"j@acme.com"}' \
               https://api.acme.com/v1.0/users
@welcome
Copy link

welcome bot commented Nov 24, 2017

👋 Thanks for opening your first issue! If you're reporting a 🐞 bug, please make sure
you include steps to reproduce it. If you're requesting a feature 🎁, please provide real
use cases that would benefit. 👪

To help make this a smooth process, please be sure you have first read the
contributing guidelines.

@salaros
Copy link
Author

salaros commented Dec 2, 2017

Did I create the issue correctly (according to your guidelines)?
This issue hasn't been labelled, assigned, commented or whatever, so I just want to know if I can to do anything else or it's OK like that

@gschier
Copy link
Contributor

gschier commented Dec 3, 2017

Hi @salaros. Sorry for the delay. I've just been really busy.

One thing that is useful when submitting feature requests like this is to explain WHY you need it as well. Are you looking to automate Insomnia in some way?

As for the CLI. I think the first step here is to come up with an API that makes sense and can facilitate future expansion. I really like the structure of the Heroku CLI but am open to suggestions. The general structure is heroku FEATURE:COMMAND ...ARGS. A similar command in Heroku would be heroku apps:open insomnia to open the Insomnia application in the web browser.

I won't have time to work on this feature for a while but I'd be happy to help design the API and provide guidance if you wanted to take it on.

@stale
Copy link

stale bot commented Feb 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Bot: Stale Issue label Feb 1, 2018
@salaros
Copy link
Author

salaros commented Feb 1, 2018

@gschier personally I like cURL syntax more, please read my proposal more carefully.
IMO cURL's command line options have a cleaner and better documented options.

As for why I need it:

  • I would like to be able to set Insomnia as "browser" while debugging APIs in Visual Studio / VS Code / Atom, so that it IDE will use it in its post build scripts
    image

  • Additionally I would like to be able to include some scripts into my repositories. In this scripts I could call APIs using the awesome Insomnia software and fallback on cURL if Insomnia is not installed.

@stale stale bot removed the stale Bot: Stale Issue label Feb 1, 2018
@stale
Copy link

stale bot commented Apr 2, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Bot: Stale Issue label Apr 2, 2018
@stale stale bot closed this as completed Apr 9, 2018
@salaros
Copy link
Author

salaros commented Apr 25, 2018

So do you have any ETA on this? I'm willing to donate or pay for a subscription etc if you implement this feature 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Bot: Stale Issue
Projects
None yet
Development

No branches or pull requests

2 participants