---
title: "ResponseStream class"
canonical: https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/ResponseStream
---

# ResponseStream class

Writes a response body in pieces, so the client receives each piece while the handler is still producing the rest.

```csharp
public sealed class ResponseStream
```

## Public Members

| name                                                                                                     | description                                                                      |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| [Complete](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/ResponseStream/Complete)()      | Ends the body and returns the response for the handler to return.                |
| [WriteAsync](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/ResponseStream/WriteAsync)(…) | Sends one piece of the body, and completes when Isoplane has accepted all of it. |

## Remarks

[`Stream`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/Response/Stream) creates one, and shows the whole pattern: write each piece with [`WriteAsync`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/ResponseStream/WriteAsync), then return [`Complete`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/ResponseStream/Complete) from the handler.

The writer takes bytes. Encode text first, for example with `Encoding.UTF8.GetBytes`.

## See Also

- namespace [Isoplane](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk)
