HttpRequestBody class

Represents a body content, used by HttpRequest.

Constructors

HttpRequestBody(Object? content, String? type, [Map<String, Object?>? parameters])

Properties

contentAsSendData → dynamic
no setter
contentAsString → String?
Content of the body.
no setter
contentType → String?
Type of the body (Content-Type header).
no setter
hasContent → bool
Returns true if has content.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasNoContent → bool
Returns true if has no content.
no setter
hasNoContentType → bool
Returns true if has no contentType.
no setter
isJSONType → bool
Returns true if contentType is a JSON (application/json).
no setter
isNull → bool
Returns true if hasNoContent and hasNoContentType.
no setter
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 Properties

NULL → HttpRequestBody
final

Static Methods

normalizeType(String? bodyType) → String?
Normalizes a Content-Type, allowing aliases like: json, png, jpeg and javascript.