-replace httpparty with rest_client
-support legacy interface
tests