HttpMethodFilter<T> class
Passes only events whose HTTP method is in allowedMethods.
Works with any event type T by extracting the method via
methodExtractor. Method comparison is case-sensitive — callers should
normalise to uppercase if needed.
- Inheritance
-
- Object
- NetworkFilter<
T> - HttpMethodFilter
Constructors
-
HttpMethodFilter({required Set<
String> allowedMethods, required String methodExtractor(T)}) -
const
Properties
-
allowedMethods
→ Set<
String> -
Allowed HTTP methods (e.g.
{'GET', 'POST'}).final - hashCode → int
-
The hash code for this object.
no setterinherited
- methodExtractor → String Function(T)
-
Extracts the HTTP method string from the event value.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
apply(
T value) → bool -
Returns
trueifvalueshould be logged.override -
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