the source data
the media type
Gets a byte array representation of the body, if possible.
Gets a byte array representation of the body, if possible. Some implementations do not provide this.
Gets a string representation of the body, if possible.
Gets a string representation of the body, if possible. Otherwise, "..." is returned.
Returns this
because the implementation already contains cached data.
Returns this
because the implementation already contains cached data.
the media type
the media type
Gets the function that consumes this request body.
Gets the function that consumes this request body.
Equality between two instances is defined in terms of equality of both the byte content and the media type.
Equality between two instances is defined in terms of equality of both the byte content and the media type.
another instance, typically of a RequestBody
true iff two instances return the same results from asBytes
, and they
share the same media type, then they are equal.
The hash code is computed from asBytes
merged with the hash code from the media type.
The hash code is computed from asBytes
merged with the hash code from the media type.
Gets the string representation and the content type for diagnostic purposes.
Gets the string representation and the content type for diagnostic purposes.
Provides a request body based simply on a string. It is normally more convenient to construct instances via
RequestBody
.