title: TypeError with urlopen()
body: <p>I am a bit confused with using Request, urlopen and JSONDecoder().decode().</p>
  
  <p>Currently I have:</p>
  
  <pre><code>hdr = {'User-agent' : 'anything'}  # header, User-agent header describes my web browser
  </code></pre>
  
  <p>I am assuming that the server uses this to determine which browsers are acceptable? Not sure</p>
  
  <p>my url is:</p>
  
  <pre><code>url = 'http://wwww.reddit.com/r/aww.json'
  </code></pre>
  
  <p>I set a req variable</p>
  
  <pre><code>req = Request(url,hdr)  #request to access the url with header
  json = urlopen(req).read()   # read json page
  </code></pre>
  
  <p>I tried using urlopen in terminal and I get this error:</p>
  
  <pre><code>TypeError: must be string or buffer, not dict # This has to do with me header?
  
  data = JSONDecoder().decode(json)   # translate json data so I can parse through it with regular python functions?
  </code></pre>
  
  <p>I'm not really sure why I get the <code>TypeError</code></p>