Install HTTPie on Linux
http www.test.com User-Agent:Xmodulo/1.0 Referer:http://xmodulo.com MyParam:Foo
# Debian, Ubuntu or Linux Mint: sudo apt-get install httpie # Fedora: sudo yum install httpie # CentOS/RHEL: sudo yum install httpie sudo pip install --upgrade httpie
# Download http www.test.com/my_file.zip > my_file.zip http --download www.test.com/my_file.zip # Custom HTTP Method http PUT www.test.com name='Dan Nanni' email=dan@email.com # Submit a Form http -f POST www.test.com name='Dan Nanni' comment='Hi there' # JSON Support POST / HTTP/1.1 Host: www.test.com Content-Length: 44 Content-Type: application/json; charset=utf-8 Accept-Encoding: gzip, deflate, compress Accept: application/json User-Agent: HTTPie/0.8.0 {"name": "Dan Nanni", "comment": "Hi there"} # Input Redirect http POST api.test.com/db/lookup < my_info.json echo '{"name": "Dan Nanni"}' | http POST api.test.com/db/lookup
반응형
'os > Linux' 카테고리의 다른 글
CentOS 6.7에서 yum install nodejs 에러 (4) | 2015.09.18 |
---|---|
CentOS Minimal 설치 후 네트워크 잡기 (0) | 2015.09.15 |
Linux USB 포멧 (0) | 2015.03.26 |
가벼운 멀티 터미널 애플리케이션 (0) | 2015.03.10 |
gblic 보안패치 (0) | 2015.01.29 |