httpie / cli

🥧 HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more.
https://httpie.io
BSD 3-Clause "New" or "Revised" License
33.22k stars 3.67k forks source link

Improve CLI usability (positional arguments order) #239

Open jkbrzt opened 10 years ago

jkbrzt commented 10 years ago

Either allow request items to be specified before URL or improve the error message.

https://twitter.com/akrabat/status/488285985672019968

image

jkbrzt commented 3 years ago

Positional arguments:

Arguments order:

# An example of an ambiguous random-order positional argument set:
$ http     pie.dev/post            httpie.io/a=a
           ^^^^^^^^^^^^            ^^^^^^^^^^^^^^
             Valid URL       Both valid URL & data field 
RakshithRAcharya commented 3 years ago

Can I take up this issue??...... Is it still open??

sabberworm commented 6 months ago

I don’t think REQUEST_ITEMs need to be allowed to come before the URL but it sure would be great if the ---prefixed options would be allowed everywhere.

Specifically, I often need to switch the HTTP verb. The fact that it cannot be simply added after http but instead needs to be inserted between the last option and the URL, makes it difficult to edit an existing command.

I.e. allow http post --auth admin in addition to http --auth admin post.

While we’re at it, a shorthand for --verify=no would also be appreciated.

EDIT: See #125 and #1536