HttpResponseSender class Null safety

Helper class that handles HTTP-based responses.

Constructors

HttpResponseSender()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

sendCreatedResult(Request req, dynamic result) FutureOr<Response>
Creates a function that sends newly created object as JSON. That callack function call be called directly or passed as a parameter to business logic components.
sendDeletedResult(Request req, dynamic result) FutureOr<Response>
Creates a function that sends deleted object as JSON. That callack function call be called directly or passed as a parameter to business logic components.
sendEmptyResult(Request req, dynamic err) FutureOr<Response>
Creates a function that sends an empty result with 204 status code. If error occur it sends ErrorDescription with approproate status code.
sendError(Request req, dynamic error) FutureOr<Response>
Sends error serialized as ErrorDescription object and appropriate HTTP status code. If status code is not defined, it uses 500 status code.
sendResult(Request req, dynamic result) FutureOr<Response>
Creates a function that sends result as JSON object. That function call be called directly or passed as a parameter to business logic components.