Add a generic helper for building rest API clients