added helper method to get http response code