title: Getting bytes response from request
body: <p>I'm trying to perform a request at Python 3, to a url that should return a JSON. Instead it's returning a sequence of bytes that i'm unable to convert. Why am i receiving this type of response and how can i convert it into human-readable data?</p>
  <p>Bellow a snippet of my code:</p>
  <pre><code>headers = {}
  headers['Host']= 'XXXXX' # hidden
  headers['Connection']= 'keep-alive'
  headers['Content-Length']= '122'
  headers['Accept']= 'application/json, text/javascript, */*; q=0.01'
  headers['Origin']= 'XXXXX' # hidden
  headers['X-Requested-With']= 'XMLHttpRequest'
  headers['User-Agent']= 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'
  headers['Content-Type']= 'application/json'
  headers['Referer']= 'XXXXX' # hidden
  headers['Accept-Encoding']= 'gzip, deflate, br'
  headers['Accept-Language']= 'pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7'
  headers['Cookie'] = 'XXXXX' # hidden
  
  try:
  
      req = request.Request(url,post_data,headers)
      x = request.urlopen(req)
      print(x.read())
      print(x.info())
  
  except Exception as e:
      print(e)
  </code></pre>
  <p>Bellow the response received:</p>
  <pre><code>    b'\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03L\x8fAK\x031\x10\x85\xff\xca0\x07Q\x88\x899(\xb2\xd0\x93\xf4\xe2\xa1-z]\x90\xecf\xb6\x1b\xd9d\xca$-H\xe9\x7f7\x91\x8a^\x86\x997\xef\x1b\xde\x9c\xf1D\x92\x03\'\xec\xd0j\x8b\nI\x84\x05\xbb\xf3_\x13)g\xb7\xa7\xea\x88n\x99X&quot;yx}\xdfn \x17\ti\xaf Q(3\t8\x11\xf7\xa5\x80\x87O\x1aK\x95\x8fq QW\x1bp5\x14\x8e\xaaV\x18g\'n,\x95\xe1i\xcaT\xe0\x01n\x07\xaa\xb7\t\xfa\xdfD\xab\x9a\xe7&amp;R\x99\xd9\xaf\xd6Z\xeb\x1e\xef\x1aj\x8eYL\xae&lt;\x99\x03\xc9\xf2hN\x94&lt;\xcbG\x1bL\x8b\xa5\x0f\x11\x96\x90\x08\xec\xd3\xb3\xee\x13^\x14&amp;\x17[\xfc\xb6}\xdb\xbd\xac\x7f\x1eS\xff\xfe\xda9\xc9\x04t\xd5G\xf6M\xb4\x8d\x0c\x1e\xbb{{\xf9\x06\x00\x00\xff\xff\x03\x00\xc4\xd9gg\'\x01\x00\x00'
  Date: Wed, 26 Dec 2018 16:46:48 GMT
  Server: Apache
  Strict-Transport-Security: max-age=16070400
  X-UA-Compatible: IE=Edge,chrome=1, IE=Edge,chrome=1
  Content-Type: application/json; charset=utf-8
  Vary: Accept-Encoding
  Content-Encoding: gzip
  X-Frame-Options: SAMEORIGIN
  Connection: close
  Transfer-Encoding: chunked
  </code></pre>