RangeHeader class final
A class representing the HTTP Range header.
This class manages byte ranges, such as bytes=0-499 or multiple
ranges like bytes=200-999, 2000-2499, 9500-. It allows clients to
request specific parts of a resource. It provides functionality to
parse and generate range header values for different range units like
bytes or custom units.
Constructors
-
RangeHeader({String unit = 'bytes', required List<
Range> ranges}) - Constructs a RangeHeader instance with the specified unit and list of ranges.
- RangeHeader.parse(String value)
-
Parses the Range header value and returns a RangeHeader instance.
factory
Properties
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.
override
Constants
-
codec
→ const HeaderCodec<
RangeHeader>