1

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));

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.