Table of Contents

Method FetchAsync

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

FetchAsync(string, CancellationToken)

Fetches url under the policy. Throws InvalidOperationException with the gate's own reason when any hop is refused, so callers surface an honest refusal instead of a transport error.

public Task<WebEgressFetcher.FetchResult> FetchAsync(string url, CancellationToken cancellationToken = default)

Parameters

url string
cancellationToken CancellationToken

Returns

Task<WebEgressFetcher.FetchResult>

FetchAsync(string, HttpMethod, CancellationToken)

Same gate, explicit method: HEAD serves metadata probes without pulling a body.

public Task<WebEgressFetcher.FetchResult> FetchAsync(string url, HttpMethod method, CancellationToken cancellationToken = default)

Parameters

url string
method HttpMethod
cancellationToken CancellationToken

Returns

Task<WebEgressFetcher.FetchResult>
Share