MockResponse class
Constructors
MockResponse (int status , {dynamic body , Encoding ? encoding , String ? statusText })
MockResponse.badGateway ({dynamic body , String ? statusText })
factory
MockResponse.badRequest ({dynamic body , String ? statusText })
factory
MockResponse.forbidden ({dynamic body , String ? statusText })
factory
MockResponse.internalServerError ({dynamic body , String ? statusText })
factory
MockResponse.methodNotAllowed ({dynamic body , String ? statusText })
factory
MockResponse.notFound ({dynamic body , String ? statusText })
factory
MockResponse.notImplemented ({dynamic body , String ? statusText })
factory
MockResponse.ok ({dynamic body , String ? statusText })
factory
MockResponse.unauthorized ({dynamic body , String ? statusText })
factory
Properties
body
→ HttpBody
This response's body. Provides synchronous access to the response body as
bytes, text, or JSON.
no setter override
contentLength
→ int
Gets and sets the content-length of the request, in bytes. If the size of
the request is not known in advance, set this to null.
no setter override
contentType
→ MediaType ?
Content-type of this request.
no setter override
encoding
→ Encoding ?
Encoding that will be used to decode the response body. This encoding is
selected based on contentType 's charset
parameter. If charset
is not
given or the encoding name is unrecognized, latin1 is used by default
(RFC 2616 ).
no setter override
hashCode
→ int
The hash code for this object.
no setter inherited
Headers sent with the response to the HTTP request.
no setter override
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
status
→ int
Status code of the response to the HTTP request.
200, 404, etc.
no setter override
statusText
→ String
Status text of the response to the HTTP request.
'OK', 'Not Found', etc.
no setter override