More generic response body parser to support python 3