Context class

Context encapsulates the current HTTP request and response building utilities.

Constructors

Context(Request request)

Properties

hashCode int
The hash code for this object.
no setterinherited
request Request
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

json(Object? body, {int statusCode = 200, Map<String, Object>? headers}) Response
Returns a JSON response.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
text(String body, {int statusCode = 200, Map<String, Object>? headers}) Response
Returns a text response.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited