我应该如何访问公共问题,因为当我通过Java访问它时会发生“401 Unauthorized”异常。
很少有公共问题:
代码:
JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
URI jiraServerUri = new URI("https://issues.sonatype.org/rest/api/2/search");
JiraRestClient client = factory.createWithBasicHttpAuthentication(jiraServerUri, username, password);