use method

HttpClient use(
  1. List<HttpMiddleware> middleware
)

Adds middleware to this HTTP client.

Middleware functions are executed in reverse order of registration (last added is executed first).

middleware List of middleware functions to add.

Returns this HttpClient for method chaining.

Implementation

HttpClient use(List<HttpMiddleware> middleware) {
  _middlewares.addAll(middleware);
  return this;
}