App-Adenosine

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

Description

    Adenosine is a tiny script wrapper for curl <http://curl.haxx.se/>. It
    provides a simple, concise shell interface for interacting with REST
    <http://en.wikipedia.org/wiki/Representational_State_Transfer>
    services. Since it is just a command you run in your shell and not in
    its own separate command environment you have access to all the
    powerful shell tools, such as perl, awk, grep, sed, etc. You can use
    adenosine in pipelines to process data from REST services, and PUT or
    POST the data right back. You can even pipe the data in and then edit
    it interactively in your text editor prior to PUT or POST.

    Cookies are supported automatically and stored in a file locally. Most
    of the arguments are remembered from one call to the next to save
    typing. It has pretty good defaults for most purposes. Additionally,
    adenosine allows you to easily provide your own options to be passed
    directly to curl, so even the most complex requests can be accomplished
    with the minimum amount of command line pain.

    Here is a nice screencast showing adenosine (née resty) in action
    <http://jpmens.net/2010/04/26/resty/> (by Jan-Piet Mens).

Quick Start

 From git

    Grab the files from github:

          $ git clone http://github.com/frioux/app-adenosine-prefab

    Source the exports before using it. (You can put this line in your
    ~/.bashrc file if you want.)

          $ . app-adenosine-prefab/adenosine-exports

 From CPAN

    If you are a Perl user you can install adenosine from CPAN as follows:

          $ cpanm App::Adenosine

    And then source the function wrappers as follows:

          $ eval $(adenosine exports)

    Set the REST host to which you will be making your requests (you can do
    this whenever you want to change hosts, anytime).

          $ adenosine http://127.0.0.1:8080/data
          http://127.0.0.1:8080/data*

    Make some HTTP requests.

          $ GET /blogs.json
          [ {"id" : 1, "title" : "first post", "body" : "This is the first post"}, ... ]
    
          $ PUT /blogs/2.json '{"id" : 2, "title" : "updated post", "body" : "This is the new."}'
          {"id" : 2, "title" : "updated post", "body" : "This is the new."}
    
          $ DELETE /blogs/2
    
          $ POST /blogs.json '{"title" : "new post", "body" : "This is the new new."}'
          {"id" : 204, "title" : "new post", "body" : "This is the new new."}

What's Next?

    Check out some of the plugins available for adenosine! Right now
    there's just two, Rainbow and Stopwatch. To use them, edit the
    bin/adenosine file and uncomment the plugin lines.

Hacking!

    Want to add some features? Fork the frioux/app-adenosine repository and



( run in 1.717 second using v1.01-cache-2.11-cpan-6aa56a78535 )