Project

rcurl

0.0
No commit activity in last 3 years
No release in over 3 years
curl tool by ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.16
~> 10.0

Runtime

 Project Readme

Rcurl

Simple curl command wrapper

Installation

$ gem install rcurl

Usage

GET

Create example.yaml

method: GET
params:
  hoge: fuga

execute rcurl command with option -d

$ rcurl -d @path/to/example.yaml http://example.com

# => curl -sS -X GET http://example.com?hoge=fuga

POST (application/x-www-form-urlencoded)

example.yaml

method: POST
params:
  hoge: fuga
$ rcurl -d @path/to/example.yaml http://example.com

# => curl -sS -X POST -d 'hoge=fuga' http://example.com

POST (application/json)

example.yaml

method: POST
headers:
  - 'Content-type: application/json'
params:
  hoge: fuga
$ rcurl -d @path/to/example.yaml http://example.com

# => curl -sS -X POST -H 'Content-type: application/json' -d '{"hoge":"fuga"}' http://example.com

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kimromi/rcurl.