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

# ResponseStream.Complete method

Ends the body and returns the response for the handler to return.

```csharp
public Response Complete()
```

## Return Value

The [`Response`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/Response) the handler must return.

## Exceptions

| exception                 | condition                 |
| ------------------------- | ------------------------- |
| InvalidOperationException | A write has not finished. |

## Remarks

Calling it is not enough: the client is told the body has ended only when the handler returns the response. No piece can be written afterwards. If the handler throws an exception instead of returning it, the body is broken off and the client sees an incomplete response, as [`Stream`](https://isoplane.dev/docs/reference/sdk/Isoplane.Sdk/Isoplane/Response/Stream) describes.

## See Also

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