SimulatedResponse class
Response returned by simulations.
The Server.simulate method returns an instance of this class.
This class extends Response with methods to retrieve the body of the HTTP response. The other response classes (used by request handlers to produce HTTP responses) only allow the body to be produced.
- Inheritance
- Object
- Response
- SimulatedResponse
Constructors
- SimulatedResponse(_CoreResponseSimulated core, String sessionCookieName)
- Constructor
Properties
-
bodyBytes
→ List<
int> -
Retrieves the body as a list of bytes. [...]
read-only
- bodyStr → String
-
Retrieves the body as a String. [...]
read-only
- sessionId ↔ String
-
Identification of the session. [...]
read / write
- contentType ↔ ContentType
-
Content-type of the response.
read / write, inherited
-
Cookies in the response.
final, inherited
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
-
headers
→ Map<
String, List< String> > -
HTTP headers in the response.
final, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- status ↔ int
-
HTTP status code. [...]
read / write, inherited
Methods
-
toString(
) → String -
Returns a string representation of this object.
override
-
Set a cookie. [...]
inherited
-
Delete a cookie.
inherited
-
finish(
Request req) → Future -
Method that is invoked at the end of creating the HTTP response. [...]
inherited
-
header(
String name, String value) → void -
Set a HTML header [...]
inherited
-
headerAdd(
String name, String value) → void -
Set a HTTP header
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited