SSECapability class
Optional behaviors that an SSEClient implementation may or may not support. Callers query support with SSEClient.hasCapability and route around missing capabilities (for example, by switching to a query-parameter form of authentication when the transport cannot send custom request headers).
Modeled as a class with private-constructor static-const instances
rather than an enum so adding a new capability is source-compatible
for users -- a switch (capability) over an enum becomes
non-exhaustive when a new value is added.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
The capability identifier. Stable across releases and intended
only for diagnostics; comparisons should use the static const
members directly (e.g.
cap == SSECapability.requestHeaders).final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- requestHeaders → const SSECapability
-
The transport can send custom request headers. False for the
browser native
EventSourceAPI; true for HTTP-based clients.