When I Use jira-rest-java-client-core libary, I use the code as below:
JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
URI jiraServerUri = URI.create("xxxx-my-jira-url");
JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, "userNmae","password");
The Jira is deployed in public cloud. But in My company, If I connect to the public cloud, we need to add http proxy. So how to add the proxy in my code?
I tried to use the code as below to set the enviroment param. It can successfully retrieve results when I directly use HttpURLConnection to call the API URL.But If Use " JiraRestClient restClient xxx", it will return 407 error.
System.setProperty("http.proxyHost", PROXY_HOST);
System.setProperty("http.proxyPort", String.valueOf(PROXY_PORT));
System.setProperty("https.proxyHost", PROXY_HOST);
System.setProperty("https.proxyPort", String.valueOf(PROXY_PORT));