import java.io.IOException;\r
import java.io.InputStreamReader;\r
import java.net.HttpURLConnection;\r
-import java.net.URL;\r
\r
import org.apache.wicket.util.io.IOUtils;\r
import org.slf4j.Logger;\r
import org.slf4j.LoggerFactory;\r
\r
import com.gitblit.models.UserModel;\r
+import com.gitblit.utils.ConnectionUtils;\r
import com.google.gson.Gson;\r
\r
/**\r
return testingJson;\r
}\r
\r
- URL apiUrl = new URL(url + "users/current.json?key=" + apiKey);\r
- HttpURLConnection http = (HttpURLConnection) apiUrl.openConnection();\r
+ String apiUrl = url + "users/current.json?key=" + apiKey;\r
+ HttpURLConnection http = (HttpURLConnection) ConnectionUtils.openConnection(apiUrl, null, null);\r
http.setRequestMethod("GET");\r
http.connect();\r
InputStreamReader reader = new InputStreamReader(http.getInputStream());\r