title: Python http.client json request and response. How?
body: <p>I have the following code that I'd like to update to Python 3.x
  The required libraries would change to http.client and json.</p>
  
  <p>I can't seem to understand how to do it. Can you please help?</p>
  
  <pre><code>import urllib2
  import json
  
  
  data = {"text": "Hello world github/linguist#1 **cool**, and #1!"}
  json_data = json.dumps(data)
  
  req = urllib2.Request("https://api.github.com/markdown")
  result = urllib2.urlopen(req, json_data)
  
  print '\n'.join(result.readlines())
  </code></pre>