Unverified Commit a5c86202 authored by Greg Messner's avatar Greg Messner Committed by GitHub
Browse files

Updated section on using a proxy server (#141).

parent 7af51b86
...@@ -73,15 +73,16 @@ gitLabApi.unsudo(); ...@@ -73,15 +73,16 @@ gitLabApi.unsudo();
As of GitLab4J-API 4.8.2 support has been added for connecting to the GitLab server using an HTTP proxy server: As of GitLab4J-API 4.8.2 support has been added for connecting to the GitLab server using an HTTP proxy server:
```java ```java
// Log in to the GitLab server using a proxy server (with basic auth on proxy) // Log in to the GitLab server using a proxy server (with basic auth on proxy)
Map<String, Object> proxyConfiguration = ProxyClientConfig.createProxyClientConfig("http://your-proxy-server", "proxy-username", "proxy-password"); Map<String, Object> proxyConfig = ProxyClientConfig.createProxyClientConfig(
GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.server.com", "YOUR_PRIVATE_TOKEN", null, proxyConfiguration); "http://your-proxy-server", "proxy-username", "proxy-password");
``` GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.com", "YOUR_PRIVATE_TOKEN", null, proxyConfig);
```java
// Log in to the GitLab server using a proxy server (no auth on proxy) // Log in to the GitLab server using a proxy server (no auth on proxy)
Map<String, Object> proxyConfiguration = ProxyClientConfig.createProxyClientConfig("http://your-proxy-server"); Map<String, Object> proxyConfig = ProxyClientConfig.createProxyClientConfig("http://your-proxy-server");
GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.server.com", "YOUR_PRIVATE_TOKEN", null, proxyConfiguration); GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.com", "YOUR_PRIVATE_TOKEN", null, proxyConfig);
``` ```
*NOTE: See the Javadoc on the GitLabApi class for a complete list of methods accepting the proxy configuration (clientConfiguration parameter)* See the Javadoc on the GitLabApi class for a complete list of methods accepting the proxy configuration (clientConfiguration parameter)
--- ---
## GitLab API V3 and V4 Support ## GitLab API V3 and V4 Support
As of GitLab4J-API 4.2.0 support has been added for GitLab API V4. If your application requires GitLab API V3, As of GitLab4J-API 4.2.0 support has been added for GitLab API V4. If your application requires GitLab API V3,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment