Added helper method for getting charset of response body