Skip to content

Commit 3c23f2c

Browse files
authored
Update script.js
1 parent 7a87753 commit 3c23f2c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

script.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ async function startSignalR() {
2727

2828
const connection = new signalR.HubConnectionBuilder()
2929
.withUrl(connectionInfo.url, {
30-
accessTokenFactory: () => connectionInfo.accessToken
31-
// skipNegotiation: true → is nu UITGESCHAKELD
32-
// transport wordt automatisch gekozen
30+
accessTokenFactory: () => connectionInfo.accessToken,
31+
skipNegotiation: true,
32+
transport: signalR.HttpTransportType.LongPolling
3333
})
3434
.configureLogging(signalR.LogLevel.Information)
3535
.build();
@@ -56,7 +56,7 @@ document.getElementById("input-form").addEventListener("submit", async event =>
5656
appendMessage("user", message);
5757
inputField.value = "";
5858

59-
// Hier kun je in de toekomst een POST doen naar je Function om het bericht op te slaan of te routeren
59+
// Hier kun je optioneel het bericht doorsturen naar je backend met fetch()
6060
});
6161

6262
startSignalR();

0 commit comments

Comments
 (0)