add core/http tests

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-06-04 16:24:52 +05:30
parent 473851684b
commit 214d1bcf1d
10 changed files with 1177 additions and 4 deletions
@@ -7,7 +7,6 @@ import 'package:stream_chat/src/core/http/token.dart';
import 'package:stream_chat/src/core/http/token_manager.dart';
import 'package:stream_chat/src/core/error/error.dart';
///
class AuthInterceptor extends Interceptor {
///
@@ -84,7 +83,7 @@ class AuthInterceptor extends Interceptor {
);
return handler.resolve(response);
} on DioError catch (error) {
return handler.reject(error);
return handler.next(error);
}
}
return handler.next(err);
@@ -86,8 +86,8 @@ class StreamHttpClient {
/// [StreamHttpClient] instance dequeue the request task。
void unlock() => httpClient.unlock();
///Clear the current [StreamHttpClient] instance waiting queue.
void clear() => httpClient.close();
/// Clear the current [StreamHttpClient] instance waiting queue.
void clear() => httpClient.clear();
/// Shuts down the [StreamHttpClient].
///