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.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 void onNotificationEvent(Event event) { } else { teamsMessageContent = createMessageFromAdvancedContent(processedMessageContent); } - - sendPayloadToWebhook(HttpClients.createDefault(), teamsMessageContent, webhookUrl); + var client = HttpClientBuilder.create().useSystemProperties().build(); + sendPayloadToWebhook(client, teamsMessageContent, webhookUrl); } @Override