我正在尝试发出请求以触发数据集的反射刷新:
String url = "https://dremio-ee.k8s.<env>.<org>.net/api/v3/dataset/<id>/reflection";
String AUTHORIZATION = "Authorization";
String BEARER_S = "Bearer %s";
SimpleJsonHttpRequest request = new SimpleJsonHttpRequest.Builder(
SimpleJsonHttpRequest.Method.POST,
url)
.addHeader(AUTHORIZATION, String.format(BEARER_S, token.getToken()))
.build();
...
<building the request, setting headers, etc.>
...
HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
但我得到:返回错误的 HTTP 状态 {“errorMessage”:“HTTP 405 Method Not allowed”,“moreInfo”:“”}
有谁知道为什么会出现这个错误?
尝试使用“_dremio%s”而不是“Bearer %s”
构建 25.1.1-202409260159070462-716c0676 版 社区版