Python http.client json-Anforderung und-Antwort. Wie?

Ich habe den folgenden code, ich würde gerne ein update auf Python 3.x
Die benötigten Bibliotheken ändern würde http.client-und json.

Ich kann nicht scheinen, um zu verstehen, wie es zu tun. Können Sie bitte helfen?

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())
InformationsquelleAutor ASPiRE | 2012-08-01
Schreibe einen Kommentar