title: How do I modify my simple Python code, to take into account HTTP headers?
body: <pre><code>def URLRequest(url, params, method="POST"):
      r  = urllib2.urlopen(url, data=urllib.urlencode(params))
      return r
  </code></pre>
  
  <p>In this method, I send a POST request to a certain URL.  What if I want to do headers as well? I want to send a dictionary of additional headers (in addition to standard headers).</p>