TF-4339 Fix CORS issue on openid-configuration call (#4342)
This commit is contained in:
@@ -12,6 +12,9 @@ class DioClient {
|
||||
|
||||
Map<String, dynamic> getHeaders() => Map.from(_dio.options.headers);
|
||||
|
||||
Dio _createNewDio() => Dio()
|
||||
..httpClientAdapter = _dio.httpClientAdapter;
|
||||
|
||||
Future<dynamic> get(
|
||||
String path, {
|
||||
Map<String, dynamic>? queryParameters,
|
||||
@@ -32,6 +35,25 @@ class DioClient {
|
||||
.catchError((error) => throw error);
|
||||
}
|
||||
|
||||
Future<dynamic> getWithNewDio(
|
||||
String path, {
|
||||
Map<String, dynamic>? queryParameters,
|
||||
Options? options,
|
||||
CancelToken? cancelToken,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
return await _createNewDio()
|
||||
.get(
|
||||
path,
|
||||
queryParameters: queryParameters,
|
||||
options: options,
|
||||
cancelToken: cancelToken,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
)
|
||||
.then((value) => value.data)
|
||||
.catchError((error) => throw error);
|
||||
}
|
||||
|
||||
Future<dynamic> post(
|
||||
String path, {
|
||||
data,
|
||||
|
||||
Reference in New Issue
Block a user