org.sonarqube.ws.client.WsConnector.baseUrl()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中org.sonarqube.ws.client.WsConnector.baseUrl()方法的一些代码示例,展示了WsConnector.baseUrl()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WsConnector.baseUrl()方法的具体详情如下:
包路径:org.sonarqube.ws.client.WsConnector
类名称:WsConnector
方法名:baseUrl

WsConnector.baseUrl介绍

[英]Server base URL, always with trailing slash, for instance "http://localhost:9000/"
[中]服务器基URL,始终带有尾随斜杠,例如“http://localhost:9000/"

代码示例

代码示例来源:origin: SonarSource/sonarqube

public String baseUrl() {
 return target.wsConnector().baseUrl();
}

代码示例来源:origin: org.sonarsource.sonarqube/sonar-batch

public String baseUrl() {
 return target.wsConnector().baseUrl();
}

代码示例来源:origin: org.sonarsource.sonarqube/sonar-scanner-engine

public String baseUrl() {
 return target.wsConnector().baseUrl();
}

代码示例来源:origin: gabrie-allaigre/sonar-gitlab-plugin

private Rules.ShowResponse showRule(String ruleKey) {
  GetRequest getRequest = new GetRequest("api/rules/show").setParam("key", ruleKey).setMediaType(MediaTypes.PROTOBUF);
  WsResponse wsResponse = wsClient.wsConnector().call(getRequest);
  if (wsResponse.code() != 200) {
    throw new HttpException(wsClient.wsConnector().baseUrl() + toString(getRequest), wsResponse.code(), wsResponse.content());
  }
  try {
    return Rules.ShowResponse.parseFrom(wsResponse.contentStream());
  } catch (IOException e) {
    throw new IllegalStateException(e.getMessage(), e);
  }
}

相关文章