Framework for sending authenticated api calls and parsing response