AliceParser class
Body parser helper used to parsing body data.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
formatBody(
{required BuildContext context, required dynamic body, String? contentType}) → String -
Formats body based on
contentType
. If body is null it will return_emptyBody
. Otherwise if body type is json - it will try to format it. -
getContentType(
{required BuildContext context, Map< String, String> ? headers}) → String? -
Get content type from
headers
. It looks for json and if it can't find it, it will return unknown content type. -
parseHeaders(
{dynamic headers}) → Map< String, String> -
Parses headers from
dynamic
to Map<String,String>, if possible. Otherwise it will throw error.