Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Resty - a bash REST client (github.com/micha)
44 points by wooby on May 18, 2009 | hide | past | favorite | 4 comments


I've built a few toy apps that use json as intermediate formats and I've found JsonPath to be pretty effective at building ad-hoc queries. I wrapped it in a thin layer of python for command line use if anyone is interested.

Syntax and the real meat: http://goessner.net/articles/JsonPath/

My rough-and-ready wrapper: http://github.com/skorgu/pyjsonpath/tree/master


Its error handling is a little odd, and it doesn't detect unexpected commands.

    $ resty 42; echo $?
    resty: curl returned error 42
    0
    $ 
(curl was never called.)


If you look at the bash source code, resty uses curl.


I looked at the source code; that's how I spotted its bugs, including the one above. :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: