More Related Content
More from Scott Leberknight (6)
httpie
- 3. "HTTPie is a command line HTTP
client. Its goal is to make CLI
interaction with web services as
human-friendly as possible."
- httpie.org
- 7. Major Features
colorized output
output formatting
query/form parameters
security (auth, https)
headers
form file uploads
persistent sessions
supports all HTTP verbs
wget-style downloads
streamed responses
- 9. 3 cool sites to test with:
requestb.in
example.org
httpbin.org
- 27. Data Fields (form)
-f, --form
field=value
field=@file.txt
http --form requestb.in/vnm6qyvn
search='curl vs. httpie'
page=2
- 28. ...httpie will set the content type
to application/x-www-form-urlencoded
when you use --form ( or -f )...
- 33. ...httpie will set the content type
to multipart/form-data
when you do a file upload...
- 37. Testing methods with httpbin.org
http GET httpbin.org/get
http POST httpbin.org/post foo=bar
http PUT httpbin.org/put foo=bar
http PATCH httpbin.org/patch foo=bar
http -f DELETE httpbin.org/delete
- 44. http --session=user1
-a user1:secret
example.org
X-Thingy:Foo
http --session=user2
-a user2:monkey
example.org
Named Sessions
- 45. Other stuff...
HTTPS support
Supports proxies
Redirect to/from http
Control output via flags
(--headers, --body, --print, etc.)
JSON config file
Scripting support
(via --check-status)
Streaming responses