Table of Contents

Method FetchStreamAsync

Namespace
LMKit.Agents.Tools.BuiltIn.Net
Assembly
LM-Kit.NET.dll

FetchStreamAsync(string, CancellationToken)

Fetches url under the policy and hands the caller the response STREAM instead of a buffered body: every redirect hop is validated and connects pinned exactly like FetchAsync(string, CancellationToken), and the policy's timeout bounds each hop up to response headers, but the body itself is read by the caller under its own cancellation and without the byte cap. Built for large artifact downloads that a buffering fetch cannot carry. Throws InvalidOperationException with the gate's own reason when any hop is refused.

public Task<WebEgressFetcher.StreamResult> FetchStreamAsync(string url, CancellationToken cancellationToken = default)

Parameters

url string
cancellationToken CancellationToken

Returns

Task<WebEgressFetcher.StreamResult>
Share