import urllib, urllib2, json
def make_request(method, base, path, params):
if method == 'GET':
return json.loads(urllib2.urlopen(base+path+"?"+urllib.urlencode(params)).read())
elif method == 'POST':
return json.loads(urllib2.urlopen(base+path, urllib.urlencode(params)).read())
api_key = "5f1d5cb35cac44d3b"
print make_request("GET", "https://indit.ca/api/", "v1/version", {"api_key": api_key})
这组代码返回应该返回版本和状态,如 {status: 'ok', version: '1.1.0'}
我需要添加什么代码来打印该响应?