Skip to content

kimromi/rcurl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

➰ curl command wrapper - writable yaml + erb config file

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published