From 1a04e4765dd94463e90b68edd10d8dc9ef53d6fc Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 14 Sep 2018 11:28:06 +0800 Subject: [PATCH] add gitlab --- gitlab/githelper.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 gitlab/githelper.py diff --git a/gitlab/githelper.py b/gitlab/githelper.py new file mode 100644 index 0000000..b4db3bc --- /dev/null +++ b/gitlab/githelper.py @@ -0,0 +1,8 @@ +import urllib.request + +def httpGet(): + req = urllib.request.Request('http://git.kingsome.cn/api/v4/projects') + req.add_header('Private-Token', 'cRjSP2EUx1SaQYcis9W7') + print(urllib.request.urlopen(req).read()) + +httpGet()