From 5ede220a6da2cb73a6052198ec5fe9c0b749edd6 Mon Sep 17 00:00:00 2001
From: Luke Shumaker <lukeshu@lukeshu.com>
Date: Mon, 19 Jun 2017 13:27:19 -0400
Subject: Tidy the gitlab request pooling code

---
 git-mirror-gitlab-ee | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'git-mirror-gitlab-ee')

diff --git a/git-mirror-gitlab-ee b/git-mirror-gitlab-ee
index 2ec79f3..60bdb95 100755
--- a/git-mirror-gitlab-ee
+++ b/git-mirror-gitlab-ee
@@ -32,7 +32,7 @@ class GitLabEE < GitLabCE
 			unless @cache.has_key?(:mirror)
 				req = Net::HTTP::Get.new(URI(self.info["web_url"]+"/mirror"))
 				req.add_field("PRIVATE-TOKEN", @gl.config['apikey'])
-				res = @gl.connection(req.uri).request(req)
+				res = @gl.request(req)
 				if res.code != "200"
 					throw res
 				end
@@ -68,7 +68,7 @@ class GitLabEE < GitLabCE
 				"project[import_url]" => url.to_s,
 				"project[mirror_user_id]" => @gl.user_id,
 			}
-			res = @gl.connection(req.uri).request(req)
+			res = @gl.request(req)
 			if res.code != "302"
 				throw res
 			end
@@ -105,7 +105,7 @@ class GitLabEE < GitLabCE
 	def user_id
 		req = Net::HTTP::Get.new(self.config['apiurl'] + 'user')
 		req.add_field("PRIVATE-TOKEN", self.config['apikey'])
-		res = self.connection(req.uri).request(req)
+		res = self.request(req)
 		if res.code != "200"
 			raise Error.new([res, res.body])
 		end
-- 
cgit v1.2.3-2-g168b