Closed igorcafe closed 2 years ago
Hey @igoracmelo! The HTTPie command accepts our request data syntax after the URL. That is the reason you can't pass it. The correct way should be:
$ http --offline google.com
As the error in the console clearly says the --offline
argument is no longer recognized. I'm not sure why this issue was closed.
@ko2in this looks like an ancient version of HTTPie. I recommend upgrading to the latest version (https://httpie.io/docs/cli/installation).
@jakubroztocil Thanks. I installed via snap
. I've tried snap refresh httpie
but it says no updates available.
@ko2in what does http --version
say?
The version is 1.0.3, and OS is Ubuntu 20.04 LTS.
@jakubroztocil I've checked the snap and the httpie version is 3.2.1.
And https --version
also returns the same version and the --offline
argument works with https
command.
@ko2in you may have the 1.0.3
version installed using another method (e.g., pip
or apt
). So if you uninstall it (and reinstall the newer snap, if needed), you should be good.
@jakubroztocil You're right. I've also httpie installed with apt. I uninstall from apt and now it works. Thanks.
Checklist
OS: Ubuntu 20.04 LTS
Minimal reproduction code and steps
pip3 install httpie
http google.com --offline
Current result
http: error: unrecognized arguments: --offline
…
Expected result
https://httpie.io/docs/cli/introduction …
Debug output
Please re-run the command with
--debug
, then copy the entire command & output and paste both below:Additional information, screenshots, or code examples
https://httpie.io/docs/cli/introduction …