{
"path": "/3mci4xfzfic2d",
"site": "at://did:plc:lvkhxfkdwqgwrpdek3h3q2gc/site.standard.publication/3m2ojl75sm22f",
"tags": [
"unison",
"http",
"sse",
"library"
],
"$type": "site.standard.document",
"title": "SSE support for @unison/http",
"content": {
"$type": "pub.leaflet.content",
"pages": [
{
"id": "019bc2a4-ee15-7777-a14c-c9c79884f58e",
"$type": "pub.leaflet.pages.linearDocument",
"blocks": [
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 25,
"byteStart": 17
},
"features": [
{
"uri": "https://data-star.dev/",
"$type": "pub.leaflet.richtext.facet#link"
}
]
},
{
"index": {
"byteEnd": 46,
"byteStart": 39
},
"features": [
{
"uri": "https://netstack.fm/#episode-4",
"$type": "pub.leaflet.richtext.facet#link"
}
]
},
{
"index": {
"byteEnd": 241,
"byteStart": 228
},
"features": [
{
"uri": "https://share.unison-lang.org/@unison/cloud",
"$type": "pub.leaflet.richtext.facet#link"
}
]
},
{
"index": {
"byteEnd": 311,
"byteStart": 299
},
"features": [
{
"uri": "https://share.unison-lang.org/@unison/http",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": " I learned about Datastar through this podcast last year, and after reviewing the docs, I got excited about its interesting SSE support. SSE made more sense than WebSockets for some Unison Cloud use cases I had in mind. But the @unison/cloud library does not have SSE support because the underlying @unison/http library lacks it. I was thinking of working on the same, but somehow could not make it happen last year. Fresh year, new takes."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 42,
"byteStart": 11
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
},
{
"uri": "https://share.unison-lang.org/@kaychaks/http-streaming-server",
"$type": "pub.leaflet.richtext.facet#link"
}
]
},
{
"index": {
"byteEnd": 89,
"byteStart": 77
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
}
],
"plaintext": "I released @kaychaks/http-streaming-server , a micro-library built on top of @unison/http that supports streaming responses, today."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"src": "https://share.unison-lang.org/@kaychaks/http-streaming-server",
"$type": "pub.leaflet.blocks.website",
"title": "@kaychaks/http-streaming-server | Unison Share",
"description": "Explore, read docs about, and share Unison libraries",
"previewImage": {
"$type": "blob",
"ref": {
"$link": "bafkreieoohcmyztkdrdu2s6suxv5aapomu6b3x6gntymoy6s643vjim6ca"
},
"mimeType": "image/png",
"size": 6233
}
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 77,
"byteStart": 59
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
},
{
"index": {
"byteEnd": 126,
"byteStart": 114
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
}
]
},
{
"index": {
"byteEnd": 192,
"byteStart": 186
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
},
{
"uri": "https://share.unison-lang.org/@kaychaks/http-streaming-server/code/main/@jts3hsb1rlc9q1m1hj50iml50n9sl3clv6lbhbm5b1mj8g0li0pts4pc2ds3583jsohrbvkk0c9k9n79ik24mf8glgo84hu66av5u10/types/server/Routes",
"$type": "pub.leaflet.richtext.facet#link"
}
]
},
{
"index": {
"byteEnd": 204,
"byteStart": 197
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
},
{
"uri": "https://share.unison-lang.org/@kaychaks/http-streaming-server/code/main/@jts3hsb1rlc9q1m1hj50iml50n9sl3clv6lbhbm5b1mj8g0li0pts4pc2ds3583jsohrbvkk0c9k9n79ik24mf8glgo84hu66av5u10/types/server/Handler",
"$type": "pub.leaflet.richtext.facet#link"
}
]
},
{
"index": {
"byteEnd": 265,
"byteStart": 247
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#code"
},
{
"uri": "https://share.unison-lang.org/@kaychaks/http-streaming-server/code/main/@jts3hsb1rlc9q1m1hj50iml50n9sl3clv6lbhbm5b1mj8g0li0pts4pc2ds3583jsohrbvkk0c9k9n79ik24mf8glgo84hu66av5u10/types/HttpResponseStream",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "It could stream bytes, UTF-8-encoded text, and, of course, server-sent events – all of that, along with regular @unison/http support for usual HTTP1.1 and WebSocket communication. The Routes and Handler types are also updated to support the new HttpResponseStream type."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 27,
"byteStart": 10
},
"features": [
{
"uri": "https://share.unison-lang.org/@kaychaks/http-streaming-server/code/main/latest/namespaces/example/;/terms/example/combined/main",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "There are Datastar-specific examples in the repository as well."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [],
"plaintext": "Next up, making it ready for Unison Cloud. And then all the streaming use cases 🏃🏼♂️"
}
}
]
}
]
},
"bskyPostRef": {
"cid": "bafyreiflp52thupcx2kvafjes62fgdzjw4hlng55rj3p2btfi2slc7hvvi",
"uri": "at://did:plc:lvkhxfkdwqgwrpdek3h3q2gc/app.bsky.feed.post/3mci4xlvtr22d",
"commit": {
"cid": "bafyreicx6ygrsbccb234e22x6pmhb47jyw56f6jy35zng34k2kd4tkovgm",
"rev": "3mci4xlzc2f2t"
},
"validationStatus": "valid"
},
"description": "new micro library http-streaming-server",
"publishedAt": "2026-01-15T17:41:06.925Z"
}