You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow flags to be specified after the method or URL, for example http post -f example.com ...
Problem it solves
It's more human-readable than putting flags after the command. For example, "Make an HTTP post request with a form to example.com", compared to "Make an HTTP request with a form using a post request to example.com" Being able to write it in the order I'd say it out loud (or the order I'm thinking of it in my head) provides a better user experience. Of course, having the flag right after the command could still be accepted. I know you can also have the flag after the URL, but in my opinion this is better, and it shouldn't hurt anything to have another option.
Additional information, screenshots, or code examples
Hi, I’d like to work on allowing flags after the HTTP method. I can trace the current argparse parsing, add a few CLI regression cases, and preserve existing invocation forms. Is this still available for a community PR?
It sorts the CLI arguments into optionals and positionals before parsing, so flags can be specified anywhere among the positional arguments (e.g. http post -f example.com), while keeping the --no-OPTION mechanism and every existing invocation form working. Tests and a before/after behavioural comparison are included.
You're very welcome to review it or add test cases — and if you were planning to work on this yourself, just say so and I'm happy to coordinate or hand it over. Either way, feedback appreciated!
Activity
[-]Allow flags to be specified after method or after URL[/-][+]Allow flags to be specified after method[/+]Gambit-Checkmate commentedon Aug 22, 2026
Hi, I’d like to work on allowing flags after the HTTP method. I can trace the current argparse parsing, add a few CLI regression cases, and preserve existing invocation forms. Is this still available for a community PR?
Allow flags to be specified between positional arguments (httpie#1433)
Surri757 commentedon Nov 28, 2026
Hi @Gambit-Checkmate — thanks for offering to pick this up back in August, and sorry nobody replied to you at the time.
I've opened a PR for this issue: #2011
It sorts the CLI arguments into optionals and positionals before parsing, so flags can be specified anywhere among the positional arguments (e.g.
http post -f example.com), while keeping the--no-OPTIONmechanism and every existing invocation form working. Tests and a before/after behavioural comparison are included.You're very welcome to review it or add test cases — and if you were planning to work on this yourself, just say so and I'm happy to coordinate or hand it over. Either way, feedback appreciated!