You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2024/06/03 07:13:26 UTC
(streampipes) branch dev updated: feat: Support proxy settings in MS Teams sink (#2913)
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 8dcbd02683 feat: Support proxy settings in MS Teams sink (#2913)
8dcbd02683 is described below
commit 8dcbd02683cb1a77dd55d9c3da6c40bfcfa04560
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Mon Jun 3 09:13:17 2024 +0200
feat: Support proxy settings in MS Teams sink (#2913)
---
.../streampipes/sinks/notifications/jvm/msteams/MSTeamsSink.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/msteams/MSTeamsSink.java b/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/msteams/MSTeamsSink.java
index a61b944e51..80c55bb74c 100644
--- a/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/msteams/MSTeamsSink.java
+++ b/streampipes-extensions/streampipes-sinks-notifications-jvm/src/main/java/org/apache/streampipes/sinks/notifications/jvm/msteams/MSTeamsSink.java
@@ -41,7 +41,7 @@ import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.client.HttpClientBuilder;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -104,8 +104,8 @@ public class MSTeamsSink extends StreamPipesNotificationSink {
} else {
teamsMessageContent = createMessageFromAdvancedContent(processedMessageContent);
}
-
- sendPayloadToWebhook(HttpClients.createDefault(), teamsMessageContent, webhookUrl);
+ var client = HttpClientBuilder.create().useSystemProperties().build();
+ sendPayloadToWebhook(client, teamsMessageContent, webhookUrl);
}
@Override