RequestOptions class
Per-request settings.
Constructors
-
RequestOptions({Duration? timeout, void onProgress(ProgressNotificationParams progress)?, Future<
Object?> ? cancel}) -
const
Properties
-
cancel
→ Future<
Object?> ? -
Completing this cancels the request: the server is sent
notifications/cancelled(with the value as the reason when it is a string) and the call fails with an McpError. A response that arrives afterwards is ignored.final - hashCode → int
-
The hash code for this object.
no setterinherited
- onProgress → void Function(ProgressNotificationParams progress)?
-
Receives the server's
notifications/progressfor this request. Setting it sends aprogressToken, which is how a server knows to report progress; each notification also restarts the timeout (bounded by Client.maxRequestTimeout).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration?
-
How long to wait for the response (default Client.requestTimeout).
final
Methods
-
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