Context class Null safety

Default Dia Context This object extended base HttpRequest and HttpResponse object for easy access to they fields

request - base HttpRequest response - base HttpResponse headers - base response HttpHeaders statusCode - response status code contentType - response ContentType field of headers

Constructors

Context(HttpRequest _request)
Create base Context object takes HttpRequest

Properties

body ↔ dynamic
read / write
contentType ContentType?
Response Content-type field of headers
read / write
error HttpError?
Error if ctxThrow
read / write
hashCode int
The hash code for this object.
read-onlyinherited
headers HttpHeaders
base response HttpHeaders
read-only
request HttpRequest
base HttpRequest
read-only
response HttpResponse
base HttpResponse
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
statusCode int
Response status code
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
set(String key, String value) → void
Set Response HttpHeaders field key - key of header value - value for key of header
throwError(int status, {String? message, StackTrace? stackTrace, Exception? exception}) → void
Throw HttpError with status code, message and stackTrace and error
toString() String
A string representation of this object.
inherited

Operators

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