HttpBody class
Constructors
- HttpBody()
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
-
isFormData(
ContentType? contentType) → bool - http request data is form data
-
isJson(
ContentType? contentType) → bool - http request data is json
-
isUrlEncoded(
ContentType? contentType) → bool - http request data is application/x-www-form-urlencoded
-
limit(
Stream< List< body, int max) → Stream<int> >List< int> > -
pass the body through, but throw 413 once it passes
maxbytes. this catches clients that lie about or skip Content-Length. -
read(
HttpRequest request, [ContentType? contentType]) → Future< RequestBody> -
contentTypeis theContent-Typeofrequestwhen the caller already read it. Else it is read here. -
readBytes(
HttpRequest request, int max) → Future< Uint8List> -
read the whole body, but stop with 413 once it passes
maxbytes. -
readNow(
HttpRequest request, ContentType contentType) → RequestBody? - The body, when it can be made with no wait: a JSON or urlencoded body on the native server (it holds the whole body already), or a body type that Dox does not read. null when it needs read (dart:io, or multipart). Throws 413 like read.