Rest Client with some metaprogramming magic