os/Linux
wget, curl 대신 사용가능한 어플
C/H
2015. 4. 14. 08:30
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
반응형