python response headers to json