Skip to content

Commit b7f962a

Browse files
committed
feat(get) : Add body param in HTTP Get req.
1 parent a4137ba commit b7f962a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/src/api_service_impl.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ class ApiServiceImpl implements ApiService {
4646
Future<Response<T>> get<T>({
4747
String? endpoint,
4848
String? url,
49+
String? body,
4950
ApiOptions? options,
5051
}) async {
5152
return _dio!.get<T>(checkIfNotEmpty(url) ? '$url' : '$baseUrl$endpoint',
5253
cancelToken: options?.cancelToken,
54+
data: body,
5355
options: Options(
5456
headers: _formatHeaders(options),
5557
receiveTimeout: options?.receiveTimeout,

lib/src/base/api_service.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ abstract class ApiService {
99
Future<Response<T>> get<T>({
1010
String? endpoint,
1111
String? url,
12+
String? body,
1213
ApiOptions? options,
1314
});
1415

0 commit comments

Comments
 (0)