---
title: StreamingBody
url: https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/http/class.StreamingBody/
---

**Kind:** Class  
**Module:** [http](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/http/)  
**Package:** compute-sdk-cpp 0.7.0  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/body.h#L168

Include `fastly/http/body.h` to use this class.

Extends `std::ostream`, `std::streambuf`.

## Constructor

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/body.h#L183

```cpp
fastly::http::StreamingBody::StreamingBody(StreamingBody &&other)
```

**Parameters**

- `other`: `StreamingBody &&`

## Methods

### append

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/body.h#L189

```cpp
void fastly::http::StreamingBody::append(Body other)
```

**Parameters**

- `other`: `Body`

**Returns**

`void`

### append_trailer

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/body.h#L191

```cpp
fastly::expected<void> fastly::http::StreamingBody::append_trailer(std::string_view header_name, std::string_view header_value)
```

**Parameters**

- `header_name`: `std::string_view`
- `header_value`: `std::string_view`

**Returns**

`fastly::expected<void>`

### finish

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/body.h#L188

```cpp
fastly::expected<void> fastly::http::StreamingBody::finish()
```

**Returns**

`fastly::expected<void>`

### write

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/body.h#L190

```cpp
fastly::expected<size_t> fastly::http::StreamingBody::write(uint8_t *buf, size_t bufsize)
```

**Parameters**

- `buf`: `uint8_t *`
- `bufsize`: `size_t`

**Returns**

`fastly::expected<size_t>`
