我应该如何访问公共问题,因为当我通过 Java 访问它时出现“401 Unauthorized”异常。
很少有公共问题是:
- https://hibernate.atlassian.net/rest/api/2/search
- https://issues.sonatype.org/rest/api/2/search
- https://jira.springsource.org/rest/api/2/search
- https://issues.apache.org/jira/rest/api/2/search
- http://jira.codehaus.org/rest/api/2/search
代码:
JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
URI jiraServerUri = new URI("https://issues.sonatype.org/rest/api/2/search");
JiraRestClient client = factory.createWithBasicHttpAuthentication(jiraServerUri, username, password);