DefaultHttpWorker class

Inheritance

Constructors

DefaultHttpWorker({bool debug = true})

Properties

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

Methods

destroy() → dynamic
Function to destroy the worker. Currently, this is not used in this library. But, you can call this function from your application if you have access to the HttpWorker object to destroy it.
override
init({String? host, int? port}) Future
This method is called before any requests are processed. This can be used to complete any initialisation needed before the worker can call processRequest.
override
killRequest(int id) Future
Function to cancel the request with the given id.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processRequest<T>({required int id, required RequestMethod method, required Uri url, Map<String, String>? header, Object? body, Parser<T>? parser, Map<String, Object?>? meta}) → (Completer<Response<T>>, {Object? meta})
Function to process the request. This function should return a Completer with Response as the future.
override
toString() String
A string representation of this object.
inherited

Operators

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