H4Event class

Represents an HTTP request event in the H4 framework.

Constructors

H4Event(HttpRequest _request)

Properties

context ↔ Map<String, dynamic>
getter/setter pair
eventParams ← Map<String, String>
Sets the event parameters to the provided params map.
no getter
eventResponse ↔ dynamic
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
method → String
The HTTP method of the request uppercase (e.g., 'GET', 'POST', 'PUT', 'DELETE').
no setter
node → Map<String, HttpRequest>
A way to access the request triggering the event.
no setter
params ↔ Map<String, String>
getter/setter pair
path → String
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusCode ← int
no getter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
respond(dynamic handlerResult, {required void onError(String, String?, H4Event?)?, required Middleware? afterResponse}) → void
Sends the HTTP response based on the handlerResult and terminates the response stream.
respondWith(dynamic value) → void
setResponseFormat(String type) → void
Sets the response format to the specified type.
toString() → String
A string representation of this object.
inherited

Operators

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