refactor(http)!: fix cascade dart good practices + docs
This commit is contained in:
@@ -24,15 +24,23 @@ import 'package:wyatt_http_client/src/models/unfreezed_request.dart';
|
||||
import 'package:wyatt_http_client/src/pipeline.dart';
|
||||
import 'package:wyatt_http_client/src/utils/http_methods.dart';
|
||||
|
||||
/// {@template middleware_client}
|
||||
/// A custom [Client] implementation that allows you to intercept requests
|
||||
/// and responses and modify them before they are sent to the server or
|
||||
/// before they are returned to the client.
|
||||
/// {@endtemplate}
|
||||
class MiddlewareClient extends BaseClient {
|
||||
/// {@macro middleware_client}
|
||||
MiddlewareClient({
|
||||
Pipeline? pipeline,
|
||||
Client? inner,
|
||||
}) : pipeline = pipeline ?? Pipeline(),
|
||||
inner = inner ?? Client() {
|
||||
print('Using Pipeline:\n$pipeline');
|
||||
}
|
||||
inner = inner ?? Client();
|
||||
|
||||
/// The [Client] that will be used to send requests.
|
||||
final Client inner;
|
||||
|
||||
/// The [Pipeline] that will be used to intercept requests and responses.
|
||||
final Pipeline pipeline;
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user