http at your command line with curl
made slightly less painful by some bash aliases.
$ cat >> ~/.bashrc # curl niceties for REST alias get='curl -X GET' alias delete='curl -X DELETE' alias post='curl -X POST' alias put='curl -X PUT' ^D
you might use it for the (forthcoming) swivel api.
to append a new row to your data set
$ put -d "file[data]=2008-02-01,2" http://test.swivel.com/data_sets/1000027.xml?api_key=x
to get your data as a csv
$ get http://test.swivel.com/data_sets/1000027.csv?api_key=x
bash is neat.
About this entry
You’re currently reading “http at your command line with curl,” an entry on e-huned.com
- Published:
- 03.04.08 / 11am
- Category:
- personal
No comments
Jump to comment form | comments rss [?] | trackback uri [?]