> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# fetchStream

APISummary
`LynxEngine` 内部调用此方法以流式方式获取资源内容。

## 语法

### Android

```java
public void fetchStream(LynxResourceRequest request, StreamDelegate delegate);
```

#### 参数说明

- `request`: 请求所需资源。
- `delegate`: 所需资源的流。

:::note

- 此方法是可选实现的。

:::

### iOS

```objc
- (dispatch_block_t)fetchStream:(nonnull LynxResourceRequest *)request
                     withStream:(nonnull id<LynxResourceStreamLoadDelegate>)delegate;
```

#### 参数说明

- `request`: 请求所需资源。
- `delegate`: 所需资源的流。

:::note

- 此方法是可选实现的。

:::

### Harmony

```typescript
fetchStream(request: LynxResourceRequest, delegate: LynxStreamDelegate): void;
```

#### 参数说明

- `request`: 以流式方式获取资源内容的请求。
- `delegate`: 所需资源的流。

## 兼容性

**Compatibility Table**

**Query:** `lynx-native-api.lynx-generic-resource-fetcher.fetch-stream`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-native-api/lynx-generic-resource-fetcher/fetch-stream.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| fetch-stream | Yes (2.8) | Yes (3.4) | Yes (2.8) | No | No | No |

**`fetch-stream`**

LynxEngine internally calls this method to obtain resource content in a streaming manner.

**Specifications:**

