From b391b0e4d07fb805670dc86dbbc33e572cf50eeb Mon Sep 17 00:00:00 2001 From: Akalanka Perera Date: Fri, 18 Oct 2024 08:50:14 +0530 Subject: [PATCH] Fix(enhanced-http): method options --- packages/enhanced_http/lib/enhanced_http.dart | 12 ++++++------ packages/enhanced_http/lib/interceptor.dart | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/enhanced_http/lib/enhanced_http.dart b/packages/enhanced_http/lib/enhanced_http.dart index fdd6348..9b398bb 100644 --- a/packages/enhanced_http/lib/enhanced_http.dart +++ b/packages/enhanced_http/lib/enhanced_http.dart @@ -24,7 +24,7 @@ class EnhancedHttp extends StreamedRequest with Interceptor, Utils { {Map? headers, InterceptorOptions? interceptors, String? responseType, - Map? options}) async { + Map? options}) async { final url = Uri.parse('$baseURL$path'); return await request(() async { if (isStream(headers, responseType)) { @@ -49,7 +49,7 @@ class EnhancedHttp extends StreamedRequest with Interceptor, Utils { InterceptorOptions? interceptors, List? files, String? responseType, - Map? options}) async { + Map? options}) async { final url = Uri.parse('$baseURL$path'); return await request(() async { if (isStream(headers, responseType)) { @@ -110,7 +110,7 @@ class EnhancedHttp extends StreamedRequest with Interceptor, Utils { InterceptorOptions? interceptors, List? files, String? responseType, - Map? options}) async { + Map? options}) async { return _update("PUT", path, payload, headers, interceptors, files, responseType, options); } @@ -121,7 +121,7 @@ class EnhancedHttp extends StreamedRequest with Interceptor, Utils { InterceptorOptions? interceptors, List? files, String? responseType, - Map? options}) async { + Map? options}) async { return _update("PATCH", path, payload, headers, interceptors, files, responseType, options); } @@ -130,7 +130,7 @@ class EnhancedHttp extends StreamedRequest with Interceptor, Utils { {Map? headers, InterceptorOptions? interceptors, String? responseType, - Map? options}) async { + Map? options}) async { final url = Uri.parse('$baseURL$path'); return await request(() async { if (isStream(headers, responseType)) { @@ -153,7 +153,7 @@ class EnhancedHttp extends StreamedRequest with Interceptor, Utils { {Map? headers, InterceptorOptions? interceptors, String? responseType, - Map? options}) async { + Map? options}) async { final url = Uri.parse('$baseURL$path'); return await request(() async { return await http.head( diff --git a/packages/enhanced_http/lib/interceptor.dart b/packages/enhanced_http/lib/interceptor.dart index 4891b61..6cdad63 100644 --- a/packages/enhanced_http/lib/interceptor.dart +++ b/packages/enhanced_http/lib/interceptor.dart @@ -17,7 +17,7 @@ class Interceptor { Future request( Function request, Uri url, - Map? options, + Map? options, InterceptorOptions? _interceptors, ) async { _interceptors = InterceptorOptions(