parameters: (self, response)
return_statement: return response.read().decode(encoding)
docstring: Read and decode a PyPI HTTP response.
docstring_summary: Read and decode a PyPI HTTP response.
docstring_tokens: Read and decode a PyPI HTTP response .
function: def _read_pypi_response(self, response):
          """Read and decode a PyPI HTTP response."""
          import cgi
          content_type = response.getheader('content-type', 'text/plain')
          encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii')
          return response.read().decode(encoding)
function_tokens: def _read_pypi_response ( self , response ) : import cgi content_type = response . getheader ( 'content-type' , 'text/plain' ) encoding = cgi . parse_header ( content_type ) [ 1 ] . get ( 'charset' , 'ascii' ) return response . read ( ) . decode ( encoding )