unirest java库有其他选择吗?

问题描述 投票:-1回答:1
HttpResponse<JsonNode> response = Unirest.get("/rest/api/3/applicationrole")
                      .basicAuth("[email protected]", "<api_token>")
                      .header("Accept", "application/json")
                      .asJson();



                    System.out.println(response.getBody());

我正在尝试使用上述代码连接到jira服务台实例,但是即使导入了其依赖项,unirest导入也无法正常工作

<dependency>
    <groupId>com.mashape.unirest</groupId>
    <artifactId>unirest-java</artifactId>
    <version>1.4.9</version>
</dependency>

所以任何人都可以帮助我解决上述问题

谢谢

java spring-boot jira-rest-api unirest
1个回答
0
投票

您必须使用完整的URL Unirest.get(“ https://...../rest/api/3/applicationrole”)。

如果您正在访问JIRA企业,则可能还必须检查您是否在正确的网络中。

© www.soinside.com 2019 - 2024. All rights reserved.