Inspired by bat and kurly, hurl
is simple HTTP requester.
Usage: ./hurl -u <URL> [option [option]...]
Options:
-X action
specify the HTTP action (e.g. GET, POST, etc) (default "GET")
-basic string
sugar for adding the 'Authorization: Basic $val' header
-bearer string
sugar for adding the 'Authorization: Bearer $val' header
-body string
data as a string for the body of the request
-form
sugar for adding 'Content-Type: application/x-www-form-urlencoded'
-header param=value
param=value headers for the request
-help
display these program options
-param param=value
param=value data for the request
-pf
sugar for -post -form
-post
sugar for setting the HTTP action to POST
-query
append -data-urlencoded's to the target URL as a query string
-s shutup
-save
write the output to a similarly named local file; to specify a different filename, simply redirect stdout
-stdin
read the request body from stdin; request will ingore 'param' and 'body'
-summary
after the request is finished, print a brief summary
-token string
sugar for adding the 'Authorization: Token $val' header
-type string
sugar for adding the 'Content-Type: $val' header
-url string
the destination URI
Whenever I build HTTP APis, there seems to be a number of utilities that do more than I want or do what I want in ways that are more complex than I would prefer. This is my attempt at a utility that is small, simple, and does things the way I would do them. Where I tend to spend my keystrokes, I've added sugar.
- progress bars
- multipart/form-data (binary data)