Rcurl is a curl like(with limited number of features) tool with a pretty output.
It also provides simple way to send RPC requests in XML format.
This is more like a standalone gem so adding it to Gemfile would not be that much beneficial.
Install it yourself as:
$ gem install rcurl
rcurl URL [options]
For available options use
rcurl --help
Command output
Usage: rcurl URL [options]
-X, --request=TYPE Execute HTTP VERB
-r, --rpc-xml x[,y,z] Use RPC request. Provide comma separated list of arguments
-u, --user=USER:PASSWORD Basic auth user:password
-d, --body BODY Provide body -d@file_path or json/xml body
-H, --headers HEADERS HTTP headers: -H 'Content-Type: value; X-Custom-Header: value'
-h, --help Prints this help
rcurl "http://host/api/v1/resource"
rcurl "http://host/api/v1/resource" -d@data.json -X POST
rcurl -u user:password "http://host/api/v1/resource"
rcurl "http://host/api_xmlrpc/v1/resource" --rpc MethodName,Param1,Param2,ParamX
Json api
{
"customer_id" => 1,
"name" => Lucas,
"address" => "Sunset avenue",
"phone" => "123-456-789"
}#TODO:
- Implement SSL support
- Implement JSON RPC
- Implement -v, timeout flags
- Fork it ( https://github.com/[my-github-username]/rcurl/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request