WebFetchContext class final

The extraction context handed to WebSiteHandlers: shared HTTP plumbing so handlers reuse the tool's client, timeout, and byte cap.

Constructors

WebFetchContext({required Client client, required Duration timeout, required int maxBytes})
Creates a context.
const

Properties

client → Client
Shared HTTP client (injectable; MockClient in tests).
final
hashCode int
The hash code for this object.
no setterinherited
maxBytes int
Response body cap in bytes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout Duration
Per-request timeout.
final

Methods

fetch(Uri uri, {Map<String, String>? headers}) Future<WebPage>
Fetches uri through the shared plumbing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited