oha
oha copied to clipboard
Headers not working
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
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: https://github.com/hatoo/oha/issues/131