Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Moving line.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzonthemtn committed Jun 5, 2024
1 parent d9b5be4 commit 96b9b85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/opensearch/ubi/UbiActionFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ private void sendToDataPrepper(final String dataPrepperUrl, final QueryRequest q

try (CloseableHttpClient httpClient = HttpClients.createDefault()) {

final String dataPrepperUserName = environment.settings().get(UbiSettings.DATA_PREPPER_AUTH_USERNAME);

final HttpPost httpPost = new HttpPost(dataPrepperUrl);

httpPost.setEntity(new StringEntity(queryRequest.toString()));
httpPost.setHeader("Content-type", "application/json");

final String dataPrepperUserName = environment.settings().get(UbiSettings.DATA_PREPPER_AUTH_USERNAME);

if(dataPrepperUserName != null) {
final String dataPrepperPassword = environment.settings().get(UbiSettings.DATA_PREPPER_AUTH_PASSWORD);
final String auth = dataPrepperUserName + ":" + dataPrepperPassword;
Expand Down

0 comments on commit 96b9b85

Please sign in to comment.