HTTPie 比 cURL 更好用

例子

http post 'https://ng/api/person' name=q age:=0
http patch 'https://ng/api/person?id=eq.1' name=q
http patch 'https://ng/api/person?id=eq.1' age:=3
http patch https://ng/api/person id==eq.1 age:=3

http POST http://example.com/posts/3 \
    Origin:example.com \  # :   HTTP headers
    name="John Doe" \     # =   string
    q=="search" \         # ==  URL parameters (?q=search)
    age:=29 \             # :=  for non-strings
    list:='[1,3,4]' \     # :=  json
    file@file.bin \       # @   attach file
    token=@token.txt \    # =@  read from file (text)
    user:=@user.json      # :=@ read from file (json)

http --form POST example.com \
    name="John Smith" \
    cv=@document.txt	

httpie 还推荐了另一个工具:https://termible.io/,有空在弄。