コード例 #1
0
  private String getServerUser(Server server) throws Exception {
    HttpClient client =
        httpClientBuilder()
            .uri(getBaseUri(server))
            .credentials(TestSecurityProvider.CREDENTIAL)
            .build();

    HttpToolResponse response =
        HttpTool.httpGet(
            client,
            URI.create(getBaseUri(server) + "/v1/server/user"),
            ImmutableMap.<String, String>of());
    HttpTestUtils.assertHealthyStatusCode(response.getResponseCode());
    return response.getContentAsString();
  }