INNER CODE UNIT · Dart

AliceDioAdapter

jhomlala/alice · packages/alice_dio/lib/alice_dio_adapter.dart:8

class AliceDioAdapter extends InterceptorsWrapper with AliceAdapter {
  /// Handles dio request and creates alice http call based on it
  @override
  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
    final call = AliceHttpCall(options.hashCode);

    final uri = options.uri;
    call.method = options.method;
    var path = options.uri.path;
    if (path.isEmpty) {
      path = '/';
    }
    call
      ..endpoint = path
      ..server = uri.host
      ..client = 'Dio'
      ..uri = options.uri.toString();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…