# streamingSsrForHttp

Registers streaming, GET-only HTML routes for a matcher.

Path captures take precedence over same-named query parameters. HTML chunks
are emitted as they are rendered via `renderToHtml` and `HttpServerResponse.stream`.

## Signatures

```ts
export declare const streamingSsrForHttp: {
    <E, R>(input: Matcher<RenderEvent, E, R>): (router: HttpRouter) => SsrForHttpEffect<E, R>;
    <E, R>(router: HttpRouter, input: Matcher<RenderEvent, E, R>): SsrForHttpEffect<E, R>;
};
```

## Why

Streaming lets the server send ordered renderer-owned HTML chunks before the
whole page completes while preserving the same Typed matcher and Effect HTTP model.

## Ownership and lifetime

Registration adds GET routes to the supplied router. Each request owns its
navigation/router services and stream Scope. Client cancellation interrupts
rendering and runs finalizers. The stream carries typed renderer failures;
producing HTML alone does not attach client hydration behavior.

## Examples

```ts
import { streamingSsrForHttp } from "@typed/ui/HttpRouter"
import { Effect } from "effect"
import * as HttpRouter from "effect/unstable/http/HttpRouter"
import { Parse, match } from "@typed/router"
import { html } from "@typed/template"

const pages = match(Parse("/"), html`<h1>Streamed home</h1>`)
const routes = Effect.gen(function* () {
  const router = yield* HttpRouter.make
  yield* streamingSsrForHttp(router, pages)
  return router
})
```
