tools/gitlab/githelper.py
aozhiwei 633fc4269d 1
2018-09-14 13:20:26 +08:00

10 lines
304 B
Python

import urllib.request
def httpGet(url, params={}):
real_url = url + urllib.parse.urlencode(params)
req = urllib.request.Request(real_url)
req.add_header('Private-Token', 'cRjSP2EUx1SaQYcis9W7')
print(urllib.request.urlopen(req).read())
httpGet('http://git.kingsome.cn/api/v4/projects')