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 "ls" command and endpoint definitions #63

Closed
michael-lazar opened this issue Jul 15, 2016 · 4 comments
Closed

Support "ls" command and endpoint definitions #63

michael-lazar opened this issue Jul 15, 2016 · 4 comments

Comments

@michael-lazar
Copy link

I've been using this program for a few days now and overall I love it. I'm using it to test endpoints while developing my API.

One issue I have however is that whenever I type cd, my muscle memory kicks in and I immediately follow with an ls out of habit. It's always a little disappointing when this doesn't work :( I was thinking of ways to solve this, and it would be great if I could pass in my endpoint definition file ala

$ http-prompt --specification=my_api_spec.json

This would enable http-prompt to do a bunch of smart things like suggest endpoints when I type ls or autocomplete parameter names. Could also add a help command to view the documentation for any given endpoint. There are a couple of widely used spec formats, with Swagger probably being the most popular

http://nordicapis.com/top-specification-formats-for-rest-apis/

@eliangcs
Copy link
Contributor

I like the ls idea. I myself enter ls by mistake a lot, too. help command is already there for listing all the available commands, so I think it's better to keep it that way. Maybe we could use man or something like that to print the documentation of an endpoint from a spec.

My original idea for ls is to list body parameters, querystring parameters, and headers. Are you suggesting the same?

@michael-lazar
Copy link
Author

michael-lazar commented Jul 20, 2016

I was actually thinking more along the lines of treating the api as a file structure and using ls for navigation. So if you define your endpoints like this

http://website.com/
http://website.com/users/admin
http://website.com/users/{uid}
http://website.com/about
http://website.com/status

http://website.com> ls
about    users   status
http://website.com> cd users
http://website.com/users> ls
{uid}   admin
http://website.com/users> ls ..
about   users   status

@eliangcs eliangcs added the todo label Dec 28, 2016
@eliangcs
Copy link
Contributor

This feature has been added in v0.10.0, which is only available in paid subscription for now. See http://http-prompt.com/early-access for more info.

@eliangcs
Copy link
Contributor

I decided to remove the paid subscription, so this feature is publicly available now in v0.10.0.

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