Skip to content

Allow flags to be specified after method #1433

Open

Description

@asportnoy

Checklist

  • I've searched for similar feature requests.

Enhancement request

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

N/A

Activity

  1. added
    enhancement
    new
    on Sep 1, 2022
  2. changed the title [-]Allow flags to be specified after method or after URL[/-] [+]Allow flags to be specified after method[/+] on Sep 1, 2022
  3. Gambit-Checkmate commented on Aug 22, 2026

    @Gambit-Checkmate

    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?

  4. Surri757 commented on Nov 28, 2026

    @Surri757

    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-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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementnew

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions