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

Headers not working #168

Open
Ch4s3r opened this issue Jul 2, 2022 · 1 comment
Open

Headers not working #168

Ch4s3r opened this issue Jul 2, 2022 · 1 comment

Comments

@Ch4s3r
Copy link

Ch4s3r commented Jul 2, 2022

This command should not result in this error, as I also tried without the header and the URL is correctly parsed, only when adding the header the command does not work anymore.

> oha -H "foo: bar" http://localhost:8080/
error: The following required arguments were not provided:
    <url>

USAGE:
    oha [FLAGS] [OPTIONS] <url>

And the headers -H resides in the OPTIONS section, so this should be fine.
-H "foo: bar" was taken from the example in the help.

oha version 0.4.7

@hatoo
Copy link
Owner

hatoo commented Jul 2, 2022

This is because of the old clap's behavior.
in newer oha with version >= 0.5.0 (which has deps update for clap), you can run

> oha -H "foo: bar" http://localhost:8080/

without problem.

You can run like

> oha -H "foo: bar" --  http://localhost:8080/

in older oha

Related issue: #131

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

No branches or pull requests

2 participants