Skip to content

Commit

Permalink
feat(get) : Add body param in HTTP Get req.
Browse files Browse the repository at this point in the history
  • Loading branch information
TusharFA committed Aug 7, 2024
1 parent a4137ba commit b7f962a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/api_service_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ class ApiServiceImpl implements ApiService {
Future<Response<T>> get<T>({
String? endpoint,
String? url,
String? body,
ApiOptions? options,
}) async {
return _dio!.get<T>(checkIfNotEmpty(url) ? '$url' : '$baseUrl$endpoint',
cancelToken: options?.cancelToken,
data: body,
options: Options(
headers: _formatHeaders(options),
receiveTimeout: options?.receiveTimeout,
Expand Down
1 change: 1 addition & 0 deletions lib/src/base/api_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ abstract class ApiService {
Future<Response<T>> get<T>({
String? endpoint,
String? url,
String? body,
ApiOptions? options,
});

Expand Down

0 comments on commit b7f962a

Please sign in to comment.