Project

thrurl

0.0
No commit activity in last 3 years
No release in over 3 years
Call Thrift services from the command line, as easily as a cURL
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
 Project Readme

Thrurl - Thrift meets cURL

A small utility for accessing Thrift services from the command line, without having to write a service-specific client. Useful for debugging purposes, trying out services, writing integration tests, etc.

Dependencies

You need to have thrift installed. You also need to have the IDL files (.thrift) related to the service you want to call. Thrurl will compile them into Ruby code and parse your parameters to match the expected types automatically.

How to use

Thrurl is a command line client, much like cURL. Using it is simple:

thrurl -h "my-thrift-server" -p 5000 -m "checkinsPerLocation" -s "CheckinService" -a "{ user: { id: 1 } }"

Thrurl will parse the response and display it in JSON format (in case you want to use the output of the script, and because it's a nice human readable format).

Things to improve

  • The error messages when e.g. fields are missing or have the wrong type is still very cryptic
  • If you use enums, you have to pass in the value of the enum