A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
-bash/zsh: http/httpie: command not found #Snapcraft (Linux) snap install httpie #Debian apt-get install httpie #Ubuntu apt-get install httpie #Alpine apk add httpie #Arch Linux pacman -S httpie #Kali Linux apt-get install httpie #Fedora dnf install httpie #FreeBSD pkg install www/py-httpie #CentOS and RHEL yum install epel-release yum install httpie #OS X brew install httpie #Raspbian apt-get install httpie #Windows choco install httpie choco upgrade httpie #Docker docker run cmd.cat/http http
HTTPie
(发音:aitch-tee-tee-pie): 是一个 HTTP 的客户端,用户友好的 cURL 替代品。
HTTPie 让 API
变得简单,它的目标是使 CLI 与 Web 服务的交互尽可能人性化。 HTTPie 设计用于测试、调试以及通常与 API 和 HTTP 服务器交互。 http 和 https 命令允许创建和发送任意 HTTP 请求。 它们使用简单自然的语法,并提供格式化和彩色输出。
HTTPie Descktop 桌面客户端
http [flags] [METHOD] URL [ITEM [ITEM]] http [--json] [--form] [--multipart] [--boundary BOUNDARY] [--raw RAW] http [--json] [--form] [--pretty {all,colors,format,none}] [--style STYLE] [--print WHAT] [--headers] [--body] [--verbose] [--all] [--history-print 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] [--default-scheme DEFAULT_SCHEME] [--debug] [METHOD] URL [REQUEST_ITEM [REQUEST_ITEM ...]]
- GET for requests without body - POST for requests with body
http / httpie 下载文件的 URL:
http -d example.org
http / httpie 发送表单编码数据:
http -f example.org name='bob' profile_picture@'bob.png'
http / httpie 发送 JSON 对象:
http example.org name='bob'
http / httpie 指定 HTTP 方法:
http HEAD example.org
http / httpie 包括一个额外的标题:
http example.org X-MyHeader:123
http / httpie 传递用户名和密码进行服务器认证:
http -a username:password example.org
http / httpie 通过标准输入指定原始请求正文:
cat data.txt | http PUT example.org