---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---

# respond()

The **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.

After this method is called, the `view` will be transferred and no longer modifiable.

## Syntax

```js
respond(bytesWritten)
```

### Parameters

- `bytesWritten`
  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.

### Return value

`undefined`.

### Exceptions

- `TypeError`
  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.
