DefaultHttpWorker class
- Inheritance
-
- Object
- HttpWorker<
int> - DefaultHttpWorker
Constructors
- DefaultHttpWorker({bool debug = true})
Properties
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(
{Uri? baseUrl}) → 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< , {Object? meta})T> > -
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