Skip to content

Commit

Permalink
[ISSUE #4723] Fix get meta from nacos return 403 (#4724)
Browse files Browse the repository at this point in the history
* fix issue #4723

* use constant value
  • Loading branch information
karsonto authored Jan 5, 2024
1 parent b3f5375 commit 8ebc984
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ private Map<String, String> getResultFromNacos(int pageNo, int pageSize, String
}
URI uri = uriBuilder.build();
HttpGet httpGet = new HttpGet(uri);
httpGet.setHeader(NacosConstant.USERNAME, username);
httpGet.setHeader(NacosConstant.PASSWORD, password);
try (CloseableHttpResponse closeableHttpResponse = httpclient.execute(httpGet)) {
if (closeableHttpResponse.getStatusLine().getStatusCode() == 200) {
String response = EntityUtils.toString(closeableHttpResponse.getEntity(), StandardCharsets.UTF_8);
Expand Down

0 comments on commit 8ebc984

Please sign in to comment.