added tests for request functions in the api call