-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
hi, been trying the v4.7.4 , I am getting a error
u.local/:1 EventSource's response has a MIME type ("text/plain") that is not "text/event-stream". Aborting the connection.
index.html
<!DOCTYPE html>
<head>
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
<script src="https://unpkg.com/htmx-ext-sse@2.2.2/sse.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-50 min-h-screen p-8 text-center">
<!-- Current Time by SSE -->
<div id="current-time"
class="message time-event"
hx-ext="sse"
sse-connect="/events"
sse-swap="time">
Waiting for time update...
</div>
</body>main.nim
sse "/events":
while true:
let now = now().utc.format("ddd, d MMM yyyy HH:mm:ss")
await req.sseSend("time", now)
await sleepAsync(2500)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
