---
title: "Typescript HTTP Streaming | wasmCloud"
description: "This repository contains a HTTP component that performs a streaming response using WASI I/O and HTTP Preview2 primitives, written in Typescript."
canonical: "https://wasmcloud.com/docs/v1/examples/typescript/component/http-streaming/"
---

This is documentation for wasmCloud **v1**, which is no longer actively maintained.

For up-to-date documentation, see the **[latest version](https://wasmcloud.com/docs/)** (v2).

Version: v1

# Typescript HTTP Streaming

This repository contains a HTTP component that performs a streaming response using WASI I/O and HTTP Preview2 primitives, written in [Typescript](https://www.typescriptlang.org/).

This component:

- Uses [Typescript](https://www.typescriptlang.org/) for it's implementation
- Uses the [`wasi:http`](https://github.com/WebAssembly/wasi-http) and [`wasi:io`](https://github.com/WebAssembly/wasi-io) standard WIT definitions
- Relies on the [`httpserver` capability provider](https://github.com/wasmCloud/wasmCloud/tree/main/crates/providers/http-server) (which exposes the [`wasmcloud:httpserver` interface](https://github.com/wasmCloud/interfaces/tree/main/httpserver))
- Streams bytes in response to all HTTP requests
- Can be declaratively provisioned with [`wadm`](https://github.com/wasmCloud/wadm)

# Dependencies

> !\[WARN\] When building this project, ensure you are using a stable NodeJS release.
>
> Use of node version management tools (ex. [`nvm`](https://github.com/nvm-sh/nvm) or more newer NVM compatible tools like [`fnm`](https://github.com/Schniz/fnm)) are recommended -- a `.nvmrc` file is included for easy use.

Building this project relies on the following software:

| Name | Description |
| --- | --- |
| `wash` | [Wasmcloud Shell](https://github.com/wasmCloud/wasmCloud/tree/main/crates/wash-cli) controls your \[wasmcloud\]\[wasmcloud\] host instances and enables building components (version should be >= 0.39.0) |
| `npm` | [Node Package Manager (NPM)](https://github.com/npm/cli) which manages packages for for the NodeJS ecosystem |
| `node` | \[NodeJS runtime\]\[nodejs\] (see `.nvmrc` for version) |

# Quickstart

To get started developing this repository quickly, clone the repo and run `wash dev`:

console

```console
wash dev
```

`wash dev` does many things for you:

- Starts the [wasmCloud host](https://wasmcloud.com/docs/v1/concepts/hosts/) that can run your WebAssembly component
- Builds this project (including necessary `npm` script targets)
- Builds a declarative WADM manifest consisting of:
  - Your locally built component
  - A [HTTP server provider](https://github.com/wasmCloud/wasmCloud/tree/main/crates/providers/http-server) which will receive requests from the outside world (on port 8000 by default)
  - Necessary links between providers and your component so your component can handle web traffic
- Deploys the built manifest (i.e all dependencies to run this application) locally
- Watches your code for changes and re-deploys when necessary.

> \[!NOTE\] To do things more manually, see [`docs/slow-start.md`](https://github.com/wasmCloud/typescript/blob/main/examples/components/http-streaming/docs/slow-start.md).

## Send a request to the running component

Once `wash dev` is serving your component, to send a request to the running component (via the HTTP server provider):

console

```console
curl localhost:8000
```

## Adding Capabilities

To learn how to extend this example with additional capabilities, see the [Adding Capabilities](https://wasmcloud.com/docs/v1/tour/add-features/?lang=typescript) section of the wasmCloud documentation.

Last updated on **Nov 18, 2026** by **Liam Randall**
