added functionality for getting the response body