HTTPie in Cygwin
See original GitHub issueHi,
i’ve installed httpie on windows through pip. I want to use it through cygwin but it only works through powershell or cmd. I always get the error
Philipp@lupimi ~ $ http POST http://localhost:50231/api/Contact name=scott age:=100
usage: http-script.py [--json] [--form] [--pretty {all,colors,format,none}]
[--style STYLE] [--print WHAT] [--headers] [--body]
[--verbose] [--all] [--print-others WHAT] [--stream]
[--output FILE] [--download] [--continue]
[--session SESSION_NAME_OR_PATH | --session-read-only SESSION_NAME_OR_PATH]
[--auth USER[:PASS]] [--auth-type {basic,digest}]
[--proxy PROTOCOL:PROXY_URL] [--follow]
[--max-redirects MAX_REDIRECTS] [--timeout SECONDS]
[--check-status] [--verify VERIFY]
[--ssl {ssl2.3,ssl3,tls1,tls1.1,tls1.2}] [--cert CERT]
[--cert-key CERT_KEY] [--ignore-stdin] [--help]
[--version] [--traceback] [--debug]
[METHOD] URL [REQUEST_ITEM [REQUEST_ITEM ...]]
http-script.py: error: Request body (from stdin or a file) and request data (key=value) cannot be mixed.
is there anything i can provide?
regards
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Cygwin Package Listing
Cygwin · httpie-src: Command-line HTTP client for web services (source).
Read more >install HTTPie on babun or cygwin - Matthieu Brouillard
As I always forget how to do it on windows using babun or cygwin, I'll push here the steps I followed in order...
Read more >HTTPie for Terminal - GitHub
HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI interaction with web services as human-friendly as possible.
Read more >Executing code with http client on windows - ProcessWire
I tried httpie and wget on windows but both do not accept the command ... Thanks for that hint Charles, I downloaded and...
Read more >HTTPie doesn't honor –style colors in mintty/cygwin - Bit Armory Blog
HTTPie doesn't honor –style colors in mintty/cygwin. less than 1 minute read, May 10, 2013. Be sure to check our $TERM variable.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@celevra It looks like
stdin
under Cygwin doesn’t present itself like a TTY so HTTPie thinks it’s redirected from another program or a file. So it’s probably a bug in Cygwin. What output does this command give you?As a workaround, you could use the
--ignore-stdin
flag. And for convenience, it can be added it to your ~/.httpie/config.json under"default_options": ["--ignore-stdin"]
. Then to enable the reading ofstdin
when you need it for particular invocations, it is possible to disable the flag again via--no-ignore-stdin
.Python for windows is a windows console application, so it won’t work well in msys/cygwin’s ansi terminal.
You may use python for cygwin rather than python for windows,
Or, you may run python for windows with winpty: